PivotTable object (Excel)
Represents a PivotTable report on a worksheet.
Remarks
The PivotTable object is a member of the PivotTables collection. The PivotTables collection contains all the PivotTable objects on a single worksheet.
Because PivotTable report programming can be complex, it's generally easiest to record PivotTable report actions and then revise the recorded code.
Example
Use PivotTables (index), where index is the PivotTable index number or name, to return a single PivotTable object.
The following example makes the field named Year a row field in the first PivotTable report on Sheet3.
Worksheets("Sheet3").PivotTables(1) _
.PivotFields("Year").Orientation = xlRowField
Methods
- AddDataField
- AddFields
- AllocateChanges
- CalculatedFields
- ChangeConnection
- ChangePivotCache
- ClearAllFilters
- ClearTable
- CommitChanges
- ConvertToFormulas
- CreateCubeFile
- DiscardChanges
- DrillDown
- DrillTo
- DrillUp
- GetData
- GetPivotData
- ListFormulas
- PivotCache
- PivotFields
- PivotSelect
- PivotTableWizard
- PivotValueCell
- RefreshDataSourceValues
- RefreshTable
- RepeatAllLabels
- RowAxisLayout
- ShowPages
- SubtotalLocation
- Update
Properties
- ActiveFilters
- Allocation
- AllocationMethod
- AllocationValue
- AllocationWeightExpression
- AllowMultipleFilters
- AlternativeText
- Application
- CacheIndex
- CalculatedMembers
- CalculatedMembersInFilters
- ChangeList
- ColumnFields
- ColumnGrand
- ColumnRange
- CompactLayoutColumnHeader
- CompactLayoutRowHeader
- CompactRowIndent
- Creator
- CubeFields
- DataBodyRange
- DataFields
- DataLabelRange
- DataPivotField
- DisplayContextTooltips
- DisplayEmptyColumn
- DisplayEmptyRow
- DisplayErrorString
- DisplayFieldCaptions
- DisplayImmediateItems
- DisplayMemberPropertyTooltips
- DisplayNullString
- EnableDataValueEditing
- EnableDrilldown
- EnableFieldDialog
- EnableFieldList
- EnableWizard
- EnableWriteback
- ErrorString
- FieldListSortAscending
- GrandTotalName
- HasAutoFormat
- Hidden
- HiddenFields
- InGridDropZones
- InnerDetail
- LayoutRowDefault
- Location
- ManualUpdate
- MDX
- MergeLabels
- Name
- NullString
- PageFieldOrder
- PageFields
- PageFieldStyle
- PageFieldWrapCount
- PageRange
- PageRangeCells
- Parent
- PivotChart
- PivotColumnAxis
- PivotFormulas
- PivotRowAxis
- PivotSelection
- PivotSelectionStandard
- PreserveFormatting
- PrintDrillIndicators
- PrintTitles
- RefreshDate
- RefreshName
- RepeatItemsOnEachPrintedPage
- RowFields
- RowGrand
- RowRange
- SaveData
- SelectionMode
- ShowDrillIndicators
- ShowPageMultipleItemLabel
- ShowTableStyleColumnHeaders
- ShowTableStyleColumnStripes
- ShowTableStyleLastColumn
- ShowTableStyleRowHeaders
- ShowTableStyleRowStripes
- ShowValuesRow
- Slicers
- SmallGrid
- SortUsingCustomLists
- SourceData
- SubtotalHiddenPageItems
- Summary
- TableRange1
- TableRange2
- TableStyle2
- Tag
- TotalsAnnotation
- VacatedStyle
- Value
- Version
- ViewCalculatedMembers
- VisibleFields
- VisualTotals
- VisualTotalsForSets
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기