Creates a PivotTable report based on a PivotCache object. Returns a PivotTable object.
Syntax
expression.CreatePivotTable(TableDestination, TableName, ReadData)
expression An expression that returns a PivotCache object.
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 PivotTable report will be placed). The destination range must be on a worksheet in the workbook that contains the PivotCache 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 of the 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.
Remarks
For an alternative way to create a PivotTable report based on a PivotTable cache, see the Add method of the PivotTable object.