PivotCache.CreatePivotTable(Object, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a PivotTable report based on a PivotCache object.
public Microsoft.Office.Interop.Excel.PivotTable CreatePivotTable (object TableDestination, object TableName, object ReadData, object DefaultVersion);
Public Function CreatePivotTable (TableDestination As Object, Optional TableName As Object, Optional ReadData As Object, Optional DefaultVersion As Object) As PivotTable
Parameters
- TableDestination
- Object
Required Object. 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
- Object
Optional Object. The name of the new PivotTable report.
- ReadData
- Object
Optional Object. 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.
- DefaultVersion
- Object
Optional Object. The default version of the PivotTable report.
Returns
Remarks
For an alternative way to create a PivotTable report based on a PivotTable cache, see the Add(PivotCache, Object, Object, Object, Object) method of the PivotTable object.