Page 379 - Microsoft Office Excel 2003 Programming Inside Out
P. 379
Part 5: Manipulating Excel Objects
PivotTables and PivotCharts
Table 16-4. Key Properties and Methods of the PivotCache Object
Property/Method Description
CreatePivotTable Method: creates a PivotTable object based on the current
(TableDestination, TableName, PivotCache object.
ReadData, DefaultVersion)
Index Property (read-only): returns the index number of the
PivotCache within the PivotCaches collection.
IsConnected Property (read-only): when True, means that the
PivotCache is currently connected to a data source.
MakeConnection Method: opens a connection between the PivotCache and
the data source specified in the Connection property.
MemoryUsed Property (read-only): returns the number of bytes used by
the current PivotCache object.
OLAP Property (read-only): returns True when the cache is
connected to an OLAP server.
QueryType Property (read-only): returns the type of query as
enumerated in XlQueryType that is used to populate the
cache. Value query types are xlADORecordset,
xlDAORecordset, xlDDBCQuery, xlOLEDBQuery,
xlTextImport, and xlWebQuery.
RecordCount Property (read-only): returns the number of records in the
cache.
Chapter 16
Recordset Property: contains the Recordset object that will be used
to populate the cache.
Refresh Method: updates the information in the PivotCache object
and the associated PivotTable object.
RefreshDate Property (read-only): returns the date when the cache was
last refreshed.
RefreshPeriod Property: contains the number of minutes between
refreshes. Setting this property to zero disables
automatic refreshes.
PivotField Objects
The PivotField object represents one of the fields in a PivotTable. This object contains a
lot of useful information that describes the field, including its Name, MemoryUsed, and
NumberFormat. However, the most important properties are the Orientation and Position
properties. The Orientation property determines the area on the PivotTable where the field is
located, and the Position property determines the order of the field within a particular area.
353