Add Method (PivotTables Collection)

See Also         Example         Applies To

Adds a new PivotTable report. Returns a PivotTable object.

Syntax

expression.Add(PivotCache, TableDestination, TableName, ReadData)

expression   An expression that returns a PivotTables object.

PivotCache   Required PivotCache. The PivotTable cache on which the new PivotTable report is based. The cache provides data for the report.

TableDestination   Required Variant. The cell in the upper-left corner of the PivotTable report’s destination range (the range on the worksheet where the resulting report will be placed). You must specify a destination range on the worksheet that contains the PivotTables object specified by expression.

TableName   Optional Variant. The name of the new PivotTable report.

ReadData   Optional Variant. True to create a PivotTable cache that contains all records from the external database; this cache can be very large. False to enable setting some of the fields as server-based page fields before the data is actually read.