Methods

add(sourceData, destCellName, tableName) → Number

Adds a new PivotTable cache to a PivotCaches collection.

Parameters

Name Type Optional Description

sourceData

String

 

The data for the new PivotTable cache.

destCellName

String

 

The cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

Returns

Number The new added cache index.

add(sourceData, destCellName, tableName, useSameSource) → Number

Adds a new PivotTable cache to a PivotCaches collection.

Parameters

Name Type Optional Description

sourceData

String

 

The data for the new PivotTable cache.

destCellName

String

 

The cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

useSameSource

boolean

 

Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.

Returns

Number The new added cache index.

add(sourceData, row, column, tableName) → Number

Adds a new PivotTable cache to a PivotCaches collection.

Parameters

Name Type Optional Description

sourceData

String

 

The data cell range for the new PivotTable.Example : Sheet1!A1:C8

row

Number

 

Row index of the cell in the upper-left corner of the PivotTable report's destination range.

column

Number

 

Column index of the cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

Returns

Number The new added cache index.

add(sourceData, row, column, tableName, useSameSource) → Number

Adds a new PivotTable cache to a PivotCaches collection.

Parameters

Name Type Optional Description

sourceData

String

 

The data cell range for the new PivotTable.Example : Sheet1!A1:C8

row

Number

 

Row index of the cell in the upper-left corner of the PivotTable report's destination range.

column

Number

 

Column index of the cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

useSameSource

boolean

 

Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.

Returns

Number The new added cache index.

add(pivotTable, destCellName, tableName) → Number

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

Parameters

Name Type Optional Description

pivotTable

PivotTable

 

The source pivotTable.

destCellName

String

 

The cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

Returns

Number The new added PivotTable index.

add(pivotTable, row, column, tableName) → Number

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

Parameters

Name Type Optional Description

pivotTable

PivotTable

 

The source pivotTable.

row

Number

 

Row index of the cell in the upper-left corner of the PivotTable report's destination range.

column

Number

 

Column index of the cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

Returns

Number The new added PivotTable index.

add(sourceData, isAutoPage, pageFields, destCellName, tableName) → Number

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

Parameters

Name Type Optional Description

sourceData

Array of String

 

The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"}

isAutoPage

boolean

 

Whether auto create a single page field. If true,the following param pageFields will be ignored.

pageFields

PivotPageFields

 

The pivot page field items.

destCellName

String

 

destCellName The name of the new PivotTable report.

tableName

String

 

the name of the new PivotTable report.

Returns

Number The new added PivotTable index.

add(sourceData, isAutoPage, pageFields, row, column, tableName) → Number

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

Parameters

Name Type Optional Description

sourceData

Array of String

 

The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"}

isAutoPage

boolean

 

Whether auto create a single page field. If true,the following param pageFields will be ignored

pageFields

PivotPageFields

 

The pivot page field items.

row

Number

 

Row index of the cell in the upper-left corner of the PivotTable report's destination range.

column

Number

 

Column index of the cell in the upper-left corner of the PivotTable report's destination range.

tableName

String

 

The name of the new PivotTable report.

Returns

Number The new added PivotTable index.

add()

Reserved for internal use.

clear()

Clear all pivot tables.

contains()

Reserved for internal use.

dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

get()

Gets the PivotTable report by index.

get()

Gets the PivotTable report by pivottable's name.

get()

Gets the PivotTable report by pivottable's position.

get()

Reserved for internal use.

getCount()

indexOf()

Reserved for internal use.

iterator()

remove(pivotTable)

Deletes the specified PivotTable and delete the PivotTable data

Parameter

Name Type Optional Description

pivotTable

PivotTable

 

PivotTable object

remove(pivotTable, keepData)

Deletes the specified PivotTable

Parameters

Name Type Optional Description

pivotTable

PivotTable

 

PivotTable object

keepData

boolean

 

Whether to keep the PivotTable data

removeAt(index)

Deletes the PivotTable at the specified index and delete the PivotTable data

Parameter

Name Type Optional Description

index

Number

 

the position index in PivotTable collection

removeAt(index, keepData)

Deletes the PivotTable at the specified index

Parameters

Name Type Optional Description

index

Number

 

the position index in PivotTable collection

keepData

boolean

 

Whether to keep the PivotTable data