PivotTableCollection.Add

Add(string, string, string)

Adds a new PivotTable cache to a PivotCaches collection.

public int Add(string sourceData, string destCellName, string tableName)
ParameterTypeDescription
sourceDataStringThe data for the new PivotTable cache.
destCellNameStringThe cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.

Return Value

The new added cache index.

See Also


Add(string, string, string, bool)

Adds a new PivotTable cache to a PivotCaches collection.

public int Add(string sourceData, string destCellName, string tableName, bool useSameSource)
ParameterTypeDescription
sourceDataStringThe data for the new PivotTable cache.
destCellNameStringThe cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.
useSameSourceBooleanIndicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.

Return Value

The new added cache index.

See Also


Add(string, int, int, string)

Adds a new PivotTable cache to a PivotCaches collection.

public int Add(string sourceData, int row, int column, string tableName)
ParameterTypeDescription
sourceDataStringThe data cell range for the new PivotTable.Example : Sheet1!A1:C8
rowInt32Row index of the cell in the upper-left corner of the PivotTable report’s destination range.
columnInt32Column index of the cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.

Return Value

The new added cache index.

See Also


Add(string, int, int, string, bool)

Adds a new PivotTable cache to a PivotCaches collection.

public int Add(string sourceData, int row, int column, string tableName, bool useSameSource)
ParameterTypeDescription
sourceDataStringThe data cell range for the new PivotTable.Example : Sheet1!A1:C8
rowInt32Row index of the cell in the upper-left corner of the PivotTable report’s destination range.
columnInt32Column index of the cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.
useSameSourceBooleanIndicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.

Return Value

The new added cache index.

See Also


Add(PivotTable, string, string)

Adds a new PivotTable Object to the collection from another PivotTable.

public int Add(PivotTable pivotTable, string destCellName, string tableName)
ParameterTypeDescription
pivotTablePivotTableThe source pivotTable.
destCellNameStringThe cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.

Return Value

The new added PivotTable index.

See Also


Add(PivotTable, int, int, string)

Adds a new PivotTable Object to the collection from another PivotTable.

public int Add(PivotTable pivotTable, int row, int column, string tableName)
ParameterTypeDescription
pivotTablePivotTableThe source pivotTable.
rowInt32Row index of the cell in the upper-left corner of the PivotTable report’s destination range.
columnInt32Column index of the cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.

Return Value

The new added PivotTable index.

See Also


Add(string[], bool, PivotPageFields, string, string)

Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.

public int Add(string[] sourceData, bool isAutoPage, PivotPageFields pageFields, 
    string destCellName, string tableName)
ParameterTypeDescription
sourceDataString[]The multiple consolidation ranges,such as {“Sheet1!A1:C8”,“Sheet2!A1:B8”}
isAutoPageBooleanWhether auto create a single page field. If true,the following param pageFields will be ignored.
pageFieldsPivotPageFieldsThe pivot page field items.
destCellNameStringdestCellName The name of the new PivotTable report.
tableNameStringthe name of the new PivotTable report.

Return Value

The new added PivotTable index.

See Also


Add(string[], bool, PivotPageFields, int, int, string)

Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.

public int Add(string[] sourceData, bool isAutoPage, PivotPageFields pageFields, int row, 
    int column, string tableName)
ParameterTypeDescription
sourceDataString[]The multiple consolidation ranges,such as {“Sheet1!A1:C8”,“Sheet2!A1:B8”}
isAutoPageBooleanWhether auto create a single page field. If true,the following param pageFields will be ignored
pageFieldsPivotPageFieldsThe pivot page field items.
rowInt32Row index of the cell in the upper-left corner of the PivotTable report’s destination range.
columnInt32Column index of the cell in the upper-left corner of the PivotTable report’s destination range.
tableNameStringThe name of the new PivotTable report.

Return Value

The new added PivotTable index.

See Also