Export (0) Print
Expand All

PivotTables.Add Method 

Adds a new PivotTable report. Returns a PivotTable object.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim PivotCache As PivotCache
Dim TableDestination As Object
Dim TableName As Object
Dim ReadData As Object
Dim DefaultVersion As Object
Dim returnValue As PivotTable
Dim pivotTables1 As PivotTables
returnValue = pivotTables1.Add(PivotCache, TableDestination, TableName, ReadData, DefaultVersion)

PivotTable Add(
	[In] PivotCache PivotCache, 
	[In] object TableDestination, 
	[In, Optional] object TableName, 
	[In, Optional] object ReadData, 
	[In, Optional] object DefaultVersion
);
public PivotTable Add(
	/*in*/PivotCache PivotCache, 
	/*in*/System.Object TableDestination, 
	/*in*/System.Object TableName, 
	/*in*/System.Object ReadData, 
	/*in*/System.Object DefaultVersion
);
function Add(
	 PivotCache : PivotCache, 
	 TableDestination : Object, 
	 TableName : Object, 
	 ReadData : Object, 
	 DefaultVersion : Object
) : PivotTable;

Parameters

PivotCache

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

TableDestination

Required Object. 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 Object. The name of the new PivotTable report.

ReadData

Optional Object. 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.

DefaultVersion

Optional Object. The version of Microsoft Excel the PivotTable was originally created in.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2015 Microsoft