Page 377 - Microsoft Office Excel 2003 Programming Inside Out
P. 377
Part 5: Manipulating Excel Objects
PivotTables and PivotCharts
Table 16-2. Key Properties and Methods of the PivotTable Object
Property/Method Description
PivotCache Method: returns an object reference to the PivotCache
object associated with the PivotTable.
PivotFields (index) Method: returns either the PivotField object specified by
the index parameter, or returns the collection of all
PivotFields if index is omitted.
PivotTableWizard (SourceType, Method: constructs a PivotTable named TableName using
SourceData, TableDestination, data from SourceData and places the result at
TableName, RowGrand, TableDestination.
ColumnGrand, SaveData,
HasAutoFormat, AutoPage,
Reserved, BackgroundQuery,
OptimizeCache, PageFieldOrder,
PageFieldWrapCount,
ReadData, Connection)
RefreshTable Method: refreshes the data displayed in the PivotTable
based on the data in the associated data source.
RowFields Property (read-only): returns either a PivotField object or a
PivotFields collection containing the fields that are
currently displayed as row fields.
RowGrand Property: when True, displays grand totals for each row in
the PivotTable.
VisibleFields Property (read-only): returns either a PivotField object or a
PivotFields collection containing the fields that are Chapter 16
currently displayed in the PivotTable.
Tip Refresh Your Data
Use the RefreshTable method to update the information displayed in the PivotTable if the
source data changes.
PivotCaches Collection
The PivotCaches collection contains the set of all PivotCache objects (see Table 16-3). Because
PivotCache objects are stored at the workbook level, they can be easily used to create
PivotTables and PivotCharts anywhere in the workbook.
351