Excel) (PivotField 物件
代表樞紐分析表中的欄位。
註解
PivotField 物件是 PivotFields 集合的成員。 PivotFields 集合包含樞紐分析表中的所有欄位,包括隱藏欄位在內。
在某些情況下,選擇使用其中一個可傳回樞紐分析表欄位子集合的屬性會較為方便。 您可以使用下列屬性:
- ColumnFields 屬性
- DataFields 屬性
- HiddenFields 屬性
- PageFields 屬性
- RowFields 屬性
- VisibleFields 屬性
範例
使用 PivotFields (索引) ,其中 index 是功能變數名稱或索引編號,可傳回單一 PivotField 物件。
下列範例會使 Year 欄位變成 Sheet3 上第一個樞紐分析表中的列欄位。
Worksheets("sheet3").PivotTables(1) _
.PivotFields("year").Orientation = xlRowField
方法
- AddPageItem
- AutoGroup
- AutoShow
- AutoSort
- CalculatedItems
- ClearAllFilters
- ClearLabelFilters
- ClearManualFilter
- ClearValueFilters
- Delete
- DrillTo
- PivotItems
屬性
- AllItemsVisible
- Application
- AutoShowCount
- AutoShowField
- AutoShowRange
- AutoShowType
- AutoSortCustomSubtotal
- AutoSortField
- AutoSortOrder
- AutoSortPivotLine
- BaseField
- BaseItem
- Calculation
- Caption
- ChildField
- ChildItems
- Creator
- CubeField
- CurrentPage
- CurrentPageList
- CurrentPageName
- DatabaseSort
- DataRange
- DataType
- DisplayAsCaption
- DisplayAsTooltip
- DisplayInReport
- DragToColumn
- DragToData
- DragToHide
- DragToPage
- DragToRow
- DrilledDown
- EnableItemSelection
- EnableMultiplePageItems
- Formula
- Function
- GroupLevel
- Hidden
- HiddenItems
- HiddenItemsList
- IncludeNewItemsInFilter
- IsCalculated
- IsMemberProperty
- LabelRange
- LayoutBlankLine
- LayoutCompactRow
- LayoutForm
- LayoutPageBreak
- LayoutSubtotalLocation
- MemberPropertyCaption
- MemoryUsed
- Name
- NumberFormat
- Orientation
- Parent
- ParentField
- ParentItems
- PivotFilters
- Position
- PropertyOrder
- PropertyParentField
- RepeatLabels
- ServerBased
- ShowAllItems
- ShowDetail
- ShowingInAxis
- SourceCaption
- SourceName
- StandardFormula
- SubtotalName
- Subtotals
- TotalLevels
- UseMemberPropertyAsCaption
- Value
- VisibleItems
- VisibleItemsList
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。