PivotTable

PivotTable class

Summary description for PivotTable.

Methods

NameDescription
addCalculatedField(name, formula, dragToDataArea)Adds a calculated field to pivot field.
addCalculatedField(name, formula)Adds a calculated field to pivot field and drag it to data area.
addFieldToArea(fieldType, fieldName)Adds the field to the specific area. addFieldToArea(int, com.aspose.cells.PivotField)
addFieldToArea(fieldType, baseFieldIndex)Adds the field to the specific area. addFieldToArea(int, com.aspose.cells.PivotField)
addFieldToArea(fieldType, pivotField)Adds the field to the specific area.
calculateData()Calculates pivottable’s data to cells. Cell.Value in the pivot range could not return the correct result if the method i
calculateData()
calculateRange()Calculates pivottable’s range. If this method is not been called,maybe the pivottable range is not corrected.
changeDataSource()Set pivottable’s source data. Sheet1!$A$1:$C$3
clearAll()
clearData()Clear PivotTable’s data and formatting If this method is not called before you add or delete PivotField, Maybe the Pivot
clearFilters()
copyStyle(pivotTable)Copies named style from another pivot table.
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
fields(fieldType)Gets the specific fields by the field type. NOTE: This method is now obsolete. Instead, please use PivotField.GetFields(
format(pivotArea, style)Formats selected area of the PivotTable.
format()
format(row, column, style)Format the cell in the pivottable area
formatAll(style)Format all the cell in the pivottable area
formatRow(row, style)Format the row data in the pivottable area
getAllowMultipleFiltersPerField()
getAltTextDescription()Gets the description of the alt text
getAltTextTitle()Gets the title of the altertext
getAutoFormatType()Gets and sets the auto format type of PivotTable. The value of the property is PivotTableAutoFormatType integer constant
getAutofitColumnWidthOnUpdate()Indicates whether autofitting column width on update
getBaseFields()Returns all base pivot fields in the PivotTable.
getButtonArea()
getCellByDisplayName(displayName)Gets the Cell object by the display name of PivotField.
getChildren()Gets the Children Pivot Tables which use this PivotTable data as data source.
getColumnFields()Returns a PivotFields object that are currently shown as column fields.
getColumnGrand()Indicates whether the PivotTable report shows grand totals for columns.
getColumnHeaderCaption()Gets the Column Header Caption of the PivotTable.
getColumnRange()Returns a CellArea object that represents the range that contains the column area in the PivotTable report. Read-only.
getConditionalFormats()
getCustomListSort()Indicates whether consider built-in custom list when sort data
getDataBodyRange()Returns a CellArea object that represents the range that contains the data area in the list between the header row and t
getDataField()Gets a PivotField object that represents all the data fields in a PivotTable. Read-only. It would only be created when t
getDataFieldHeaderName()Gets and sets the name of the value area field header in the PivotTable.
getDataFields()Gets a PivotField object that represents all the data fields in a PivotTable. Read-only.It would be init only when there
getDataSource()Gets and sets the data source of the pivot table.
getDependentPivotTables()
getDisplayErrorString()Indicates whether the PivotTable report displays a custom string in cells that contain errors.
getDisplayImmediateItems()Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. The defau
getDisplayNullString()Indicates whether the PivotTable report displays a custom string if the value is null.
getEnableDataValueEditing()Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottabl
getEnableDrilldown()Gets whether drilldown is enabled.
getEnableFieldDialog()Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field.
getEnableFieldList()Gets whether enable the field list for the PivotTable.
getEnableWizard()Indicates whether the PivotTable Wizard is available.
getErrorString()Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is
getExternalConnectionDataSource()Gets the external connection data source.
getFieldListSortAscending()Indicates whether fields in the PivotTable are sorted in non-default order in the field list.
getFields(fieldType)Gets the specific pivot field list by the region.
getFilterArea()
getGrandTotalName()Returns the text string label that is displayed in the grand total column or row heading. The default value is the strin
getHorizontalBreaks()get pivot table row index list of horizontal pagebreaks
getHorizontalPageBreaks()
getIndent()Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.
getItemPrintTitles()Indicates whether PivotItem names should be repeated at the top of each printed page.
getManualUpdate()Indicates whether the PivotTable report is recalculated only at the user’s request.
getMergeLabels()True if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells
getMissingItemsLimit()Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. The v
getName()Gets the name of the PivotTable
getNamesOfSourceDataConnections()
getNullString()Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default valu
getPageFieldOrder()Gets the order in which page fields are added to the PivotTable report’s layout. The value of the property is PrintOrder
getPageFieldWrapCount()Gets the number of page fields in each column or row in the PivotTable report.
getPageFields()Returns a PivotFields object that are currently shown as page fields.
getPivotCache()
getPivotFilters()Returns a list of pivot filters.
getPivotFormatConditions()Gets the Format Conditions of the pivot table.
getPivotFormats()Gets the collection of formats applied to PivotTable.
getPivotTableStyle()
getPivotTableStyleName()Gets and sets the pivottable style name.
getPivotTableStyleType()Gets and sets the built-in pivot table style. The value of the property is PivotTableStyleType integer constant.
getPivotTablesWithSamePivotCache()
getPreserveFormatting()Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.
getPrintDrill()Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when
getPrintTitles()Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false.
getRefreshDataFlag()Indicates whether Refreshing Data or not.
getRefreshDataOnOpeningFile()Indicates whether Refresh Data when Opening File.
getRefreshDate()Gets the last date time when the PivotTable was refreshed.
getRefreshedByWho()Gets the name of the last user who refreshed this PivotTable
getRepeatItemsOnEachPrintedPage()
getRowFields()Returns a PivotFields object that are currently shown as row fields.
getRowGrand()Indicates whether the PivotTable report shows grand totals for rows.
getRowHeaderCaption()Gets the Row Header Caption of the PivotTable.
getRowRange()Returns a CellArea object that represents the range that contains the row area in the PivotTable report. Read-only.
getSaveData()Indicates whether data for the PivotTable report is saved with the workbook.
getShowColumnGrandTotals()
getShowDataTips()Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
getShowDrill()Gets and sets whether showing expand/collapse buttons.
getShowEmptyCol()Specifies a boolean value that indicates whether to include empty columns in the table
getShowEmptyRow()Specifies a boolean value that indicates whether to include empty rows in the table.
getShowMemberPropertyTips()Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.
getShowPivotStyleColumnHeader()Indicates whether the column header in the pivot table should have the style applied.
getShowPivotStyleColumnStripes()Indicates whether stripe formatting is applied for column.
getShowPivotStyleLastColumn()Indicates whether the column formatting is applied.
getShowPivotStyleRowHeader()Indicates whether the row header in the pivot table should have the style applied.
getShowPivotStyleRowStripes()Indicates whether row stripe formatting is applied.
getShowRowGrandTotals()
getShowRowHeaderCaption()Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filt
getShowValuesRow()Specifies a boolean value that indicates whether show values row. show the values row
getSource()Get pivottable’s source data.
getSource()
getSourceDataConnections()
getSourceType()The value of the property is PivotTableSourceType integer constant.
getSubtotalHiddenPageItems()Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block total
getTableRange1()Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn’t include page fi
getTableRange2()Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields. Read-
getTag()Gets a string saved with the PivotTable report.
getTopRightArea()
getValuesField()
hasBlankRows()Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add
isAutoFormat()Indicates whether the PivotTable report is automatically formatted. Checkbox “autoformat table " which is in pivottable
isExcel2003Compatible()Specifies whether the PivotTable is compatible for Excel2003 when refreshing PivotTable, if true, a string must be less
isGridDropZones()Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid)
isMultipleFieldFilters()Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.
isSelected()Indicates whether this PivotTable is selected.
move(row, column)Moves the PivotTable to a different location in the worksheet.
move(destCellName)Moves the PivotTable to a different location in the worksheet.
moveTo()
moveTo()
refreshData()Refreshes pivottable’s data and setting from it’s data source. We will gather data from data source to a pivot cache ,th
refreshData(option)Refreshes pivottable’s data and setting from it’s data source with options.
removeField(fieldType, fieldName)Removes a field from specific field area removeField(int, com.aspose.cells.PivotField)
removeField(fieldType, baseFieldIndex)Removes a field from specific field area removeField(int, com.aspose.cells.PivotField)
removeField(fieldType, pivotField)Remove field from specific field area
selectArea()
setAllowMultipleFiltersPerField()
setAltTextDescription()Gets the description of the alt text
setAltTextTitle()Gets the title of the altertext
setAutoFormat()Indicates whether the PivotTable report is automatically formatted. Checkbox “autoformat table " which is in pivottable
setAutoFormatType()Gets and sets the auto format type of PivotTable. The value of the property is PivotTableAutoFormatType integer constant
setAutoGroupField()Sets auto field group by the PivotTable. baseFieldIndex - The row or column field index in the base fields NOTE: This me
setAutoGroupField(pivotField)Sets auto field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() met
setAutofitColumnWidthOnUpdate()Indicates whether autofitting column width on update
setColumnGrand()Indicates whether the PivotTable report shows grand totals for columns.
setColumnHeaderCaption()Gets the Column Header Caption of the PivotTable.
setCustomListSort()Indicates whether consider built-in custom list when sort data
setDataFieldHeaderName()Gets and sets the name of the value area field header in the PivotTable.
setDataSource()Gets and sets the data source of the pivot table.
setDisplayErrorString()Indicates whether the PivotTable report displays a custom string in cells that contain errors.
setDisplayImmediateItems()Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. The defau
setDisplayNullString()Indicates whether the PivotTable report displays a custom string if the value is null.
setEnableDataValueEditing()Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottabl
setEnableDrilldown()Gets whether drilldown is enabled.
setEnableFieldDialog()Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field.
setEnableFieldList()Gets whether enable the field list for the PivotTable.
setEnableWizard()Indicates whether the PivotTable Wizard is available.
setErrorString()Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is
setExcel2003Compatible()Specifies whether the PivotTable is compatible for Excel2003 when refreshing PivotTable, if true, a string must be less
setFieldListSortAscending()Indicates whether fields in the PivotTable are sorted in non-default order in the field list.
setGrandTotalName()Returns the text string label that is displayed in the grand total column or row heading. The default value is the strin
setGridDropZones()Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid)
setHasBlankRows()Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add
setIndent()Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.
setItemPrintTitles()Indicates whether PivotItem names should be repeated at the top of each printed page.
setManualGroupField(baseFieldIndex, startVal, endVal, groupByList, intervalNum)Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() m
setManualGroupField(pivotField, startVal, endVal, groupByList, intervalNum)Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() m
setManualGroupField(baseFieldIndex, startVal, endVal, groupByList, intervalNum)Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() m
setManualGroupField(pivotField, startVal, endVal, groupByList, intervalNum)Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() m
setManualUpdate()Indicates whether the PivotTable report is recalculated only at the user’s request.
setMergeLabels()True if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells
setMissingItemsLimit()Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. The v
setMultipleFieldFilters()Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.
setName()Gets the name of the PivotTable
setNullString()Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default valu
setPageFieldOrder()Gets the order in which page fields are added to the PivotTable report’s layout. The value of the property is PrintOrder
setPageFieldWrapCount()Gets the number of page fields in each column or row in the PivotTable report.
setPivotTableStyle()
setPivotTableStyleName()Gets and sets the pivottable style name.
setPivotTableStyleType()Gets and sets the built-in pivot table style. The value of the property is PivotTableStyleType integer constant.
setPreserveFormatting()Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.
setPrintDrill()Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when
setPrintTitles()Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false.
setRefreshDataFlag()Indicates whether Refreshing Data or not.
setRefreshDataOnOpeningFile()Indicates whether Refresh Data when Opening File.
setRepeatItemsOnEachPrintedPage()
setRowGrand()Indicates whether the PivotTable report shows grand totals for rows.
setRowHeaderCaption()Gets the Row Header Caption of the PivotTable.
setSaveData()Indicates whether data for the PivotTable report is saved with the workbook.
setSelected()Indicates whether this PivotTable is selected.
setShowColumnGrandTotals()
setShowDataTips()Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
setShowDrill()Gets and sets whether showing expand/collapse buttons.
setShowEmptyCol()Specifies a boolean value that indicates whether to include empty columns in the table
setShowEmptyRow()Specifies a boolean value that indicates whether to include empty rows in the table.
setShowMemberPropertyTips()Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.
setShowPivotStyleColumnHeader()Indicates whether the column header in the pivot table should have the style applied.
setShowPivotStyleColumnStripes()Indicates whether stripe formatting is applied for column.
setShowPivotStyleLastColumn()Indicates whether the column formatting is applied.
setShowPivotStyleRowHeader()Indicates whether the row header in the pivot table should have the style applied.
setShowPivotStyleRowStripes()Indicates whether row stripe formatting is applied.
setShowRowGrandTotals()
setShowRowHeaderCaption()Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filt
setShowValuesRow()Specifies a boolean value that indicates whether show values row. show the values row
setSubtotalHiddenPageItems()Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block total
setTag()Gets a string saved with the PivotTable report.
setUngroup(baseFieldIndex)Sets ungroup by the PivotTable NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This
setUngroup(pivotField)Sets ungroup by the PivotTable NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This
showDetail()
showInCompactForm()Layouts the PivotTable in compact form.
showInOutlineForm()Layouts the PivotTable in outline form.
showInTabularForm()Layouts the PivotTable in tabular form.
showReportFilterPage(pageField)Show all the report filter pages according to PivotField, the PivotField must be located in the PageFields.
showReportFilterPageByIndex(posIndex)Show all the report filter pages according to the position index in the PageFields
showReportFilterPageByName(fieldName)Show all the report filter pages according to PivotField’s name, the PivotField must be located in the PageFields.

addCalculatedField(name, formula, dragToDataArea)

Adds a calculated field to pivot field.

ParameterTypeDescription
nameStringThe name of the calculated field
formulaStringThe formula of the calculated field.
dragToDataAreabooleanTrue,drag this field to data area immediately

addCalculatedField(name, formula)

Adds a calculated field to pivot field and drag it to data area.

ParameterTypeDescription
nameStringThe name of the calculated field
formulaStringThe formula of the calculated field.

addFieldToArea(fieldType, fieldName)

Adds the field to the specific area. addFieldToArea(int, com.aspose.cells.PivotField)

ParameterTypeDescription
fieldTypeNumberPivotFieldType
fieldNameStringThe name in the base fields.

Returns: Number — Number The field position in the specific fields.If there is no field named as it, return -1.

addFieldToArea(fieldType, baseFieldIndex)

Adds the field to the specific area. addFieldToArea(int, com.aspose.cells.PivotField)

ParameterTypeDescription
fieldTypeNumberPivotFieldType
baseFieldIndexNumberThe field index in the base fields.

Returns: Number — Number The field position in the specific fields.

addFieldToArea(fieldType, pivotField)

Adds the field to the specific area.

ParameterTypeDescription
fieldTypeNumberPivotFieldType
pivotFieldPivotFieldthe field in the base fields.

Returns: Number — Number the field position in the specific fields.

calculateData()

Calculates pivottable’s data to cells. Cell.Value in the pivot range could not return the correct result if the method is not been called. This method calculates data with an inner pivot cache,not original data source. So if the data source is changed, please call RefreshData() method first.

calculateData()

calculateRange()

Calculates pivottable’s range. If this method is not been called,maybe the pivottable range is not corrected.

changeDataSource()

Set pivottable’s source data. Sheet1!$A$1:$C$3

clearAll()

clearData()

Clear PivotTable’s data and formatting If this method is not called before you add or delete PivotField, Maybe the PivotTable data is not corrected

clearFilters()

copyStyle(pivotTable)

Copies named style from another pivot table.

ParameterTypeDescription
pivotTablePivotTableSource pivot table.

dispose()

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

fields(fieldType)

Gets the specific fields by the field type. NOTE: This method is now obsolete. Instead, please use PivotField.GetFields() method. This method will be removed 12 months later since May 2024. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
fieldTypeNumberPivotFieldType

Returns: PivotFieldCollection — PivotFieldCollection the specific field collection

format(pivotArea, style)

Formats selected area of the PivotTable.

ParameterTypeDescription
pivotAreaPivotArea
styleStyle

format()

format(row, column, style)

Format the cell in the pivottable area

ParameterTypeDescription
rowNumberRow Index of the cell
columnNumberColumn index of the cell
styleStyleStyle which is to format the cell

formatAll(style)

Format all the cell in the pivottable area

ParameterTypeDescription
styleStyleStyle which is to format

formatRow(row, style)

Format the row data in the pivottable area

ParameterTypeDescription
rowNumberRow Index of the Row object
styleStyleStyle which is to format

getAllowMultipleFiltersPerField()

getAltTextDescription()

Gets the description of the alt text

getAltTextTitle()

Gets the title of the altertext

getAutoFormatType()

Gets and sets the auto format type of PivotTable. The value of the property is PivotTableAutoFormatType integer constant.PivotTableAutoFormatType

getAutofitColumnWidthOnUpdate()

Indicates whether autofitting column width on update

getBaseFields()

Returns all base pivot fields in the PivotTable.

getButtonArea()

getCellByDisplayName(displayName)

Gets the Cell object by the display name of PivotField.

ParameterTypeDescription
displayNameStringthe DisplayName of PivotField

Returns: Cell — Cell the Cell object

getChildren()

Gets the Children Pivot Tables which use this PivotTable data as data source.

Returns: Array ofPivotTable — Array ofPivotTable the PivotTable array object

getColumnFields()

Returns a PivotFields object that are currently shown as column fields.

getColumnGrand()

Indicates whether the PivotTable report shows grand totals for columns.

getColumnHeaderCaption()

Gets the Column Header Caption of the PivotTable.

getColumnRange()

Returns a CellArea object that represents the range that contains the column area in the PivotTable report. Read-only.

getConditionalFormats()

getCustomListSort()

Indicates whether consider built-in custom list when sort data

getDataBodyRange()

Returns a CellArea object that represents the range that contains the data area in the list between the header row and the insert row. Read-only.

getDataField()

Gets a PivotField object that represents all the data fields in a PivotTable. Read-only. It would only be created when there are two or more data fields in the Data region. Defaultly it is in row region. You can drag it to the row/column region with PivotTable.AddFieldToArea() method .

getDataFieldHeaderName()

Gets and sets the name of the value area field header in the PivotTable.

getDataFields()

Gets a PivotField object that represents all the data fields in a PivotTable. Read-only.It would be init only when there are two or more data fields in the DataPiovtFiels. It only use to add DataPivotField to the PivotTable row/column area . Default is in row area.

getDataSource()

Gets and sets the data source of the pivot table.

getDependentPivotTables()

getDisplayErrorString()

Indicates whether the PivotTable report displays a custom string in cells that contain errors.

getDisplayImmediateItems()

Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. The default value is true.

getDisplayNullString()

Indicates whether the PivotTable report displays a custom string if the value is null.

getEnableDataValueEditing()

Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottable. Enable cell editing in the values area

getEnableDrilldown()

Gets whether drilldown is enabled.

getEnableFieldDialog()

Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field.

getEnableFieldList()

Gets whether enable the field list for the PivotTable.

getEnableWizard()

Indicates whether the PivotTable Wizard is available.

getErrorString()

Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string.

getExternalConnectionDataSource()

Gets the external connection data source.

getFieldListSortAscending()

Indicates whether fields in the PivotTable are sorted in non-default order in the field list.

getFields(fieldType)

Gets the specific pivot field list by the region.

ParameterTypeDescription
fieldTypeNumberPivotFieldType

Returns: PivotFieldCollection — PivotFieldCollection the specific pivot field collection

getFilterArea()

getGrandTotalName()

Returns the text string label that is displayed in the grand total column or row heading. The default value is the string “Grand Total”.

getHorizontalBreaks()

get pivot table row index list of horizontal pagebreaks

Returns: ArrayList — ArrayList

getHorizontalPageBreaks()

getIndent()

Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.

getItemPrintTitles()

Indicates whether PivotItem names should be repeated at the top of each printed page.

getManualUpdate()

Indicates whether the PivotTable report is recalculated only at the user’s request.

getMergeLabels()

True if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells.

getMissingItemsLimit()

Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. The value of the property is PivotMissingItemLimitType integer constant.

getName()

Gets the name of the PivotTable

getNamesOfSourceDataConnections()

getNullString()

Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default value is an empty string.

getPageFieldOrder()

Gets the order in which page fields are added to the PivotTable report’s layout. The value of the property is PrintOrderType integer constant.

getPageFieldWrapCount()

Gets the number of page fields in each column or row in the PivotTable report.

getPageFields()

Returns a PivotFields object that are currently shown as page fields.

getPivotCache()

getPivotFilters()

Returns a list of pivot filters.

getPivotFormatConditions()

Gets the Format Conditions of the pivot table.

getPivotFormats()

Gets the collection of formats applied to PivotTable.

getPivotTableStyle()

getPivotTableStyleName()

Gets and sets the pivottable style name.

getPivotTableStyleType()

Gets and sets the built-in pivot table style. The value of the property is PivotTableStyleType integer constant.

getPivotTablesWithSamePivotCache()

getPreserveFormatting()

Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.

getPrintDrill()

Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when displayed on pivottable.

getPrintTitles()

Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false.

getRefreshDataFlag()

Indicates whether Refreshing Data or not.

getRefreshDataOnOpeningFile()

Indicates whether Refresh Data when Opening File.

getRefreshDate()

Gets the last date time when the PivotTable was refreshed.

getRefreshedByWho()

Gets the name of the last user who refreshed this PivotTable

getRepeatItemsOnEachPrintedPage()

getRowFields()

Returns a PivotFields object that are currently shown as row fields.

getRowGrand()

Indicates whether the PivotTable report shows grand totals for rows.

getRowHeaderCaption()

Gets the Row Header Caption of the PivotTable.

getRowRange()

Returns a CellArea object that represents the range that contains the row area in the PivotTable report. Read-only.

getSaveData()

Indicates whether data for the PivotTable report is saved with the workbook.

getShowColumnGrandTotals()

getShowDataTips()

Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.

getShowDrill()

Gets and sets whether showing expand/collapse buttons.

getShowEmptyCol()

Specifies a boolean value that indicates whether to include empty columns in the table

getShowEmptyRow()

Specifies a boolean value that indicates whether to include empty rows in the table.

getShowMemberPropertyTips()

Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.

getShowPivotStyleColumnHeader()

Indicates whether the column header in the pivot table should have the style applied.

getShowPivotStyleColumnStripes()

Indicates whether stripe formatting is applied for column.

getShowPivotStyleLastColumn()

Indicates whether the column formatting is applied.

getShowPivotStyleRowHeader()

Indicates whether the row header in the pivot table should have the style applied.

getShowPivotStyleRowStripes()

Indicates whether row stripe formatting is applied.

getShowRowGrandTotals()

getShowRowHeaderCaption()

Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs

getShowValuesRow()

Specifies a boolean value that indicates whether show values row. show the values row

getSource()

Get pivottable’s source data.

getSource()

getSourceDataConnections()

getSourceType()

The value of the property is PivotTableSourceType integer constant.

getSubtotalHiddenPageItems()

Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals. The default value is False.

getTableRange1()

Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn’t include page fields. Read-only.

getTableRange2()

Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields. Read-only.

getTag()

Gets a string saved with the PivotTable report.

getTopRightArea()

getValuesField()

hasBlankRows()

Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add blank rows.

isAutoFormat()

Indicates whether the PivotTable report is automatically formatted. Checkbox “autoformat table " which is in pivottable option for Excel 2003

isExcel2003Compatible()

Specifies whether the PivotTable is compatible for Excel2003 when refreshing PivotTable, if true, a string must be less than or equal to 255 characters, so if the string is greater than 255 characters, it will be truncated. if false, a string will not have the aforementioned restriction. The default value is true.

isGridDropZones()

Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid)

isMultipleFieldFilters()

Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.

isSelected()

Indicates whether this PivotTable is selected.

move(row, column)

Moves the PivotTable to a different location in the worksheet.

ParameterTypeDescription
rowNumberrow index.
columnNumbercolumn index.

move(destCellName)

Moves the PivotTable to a different location in the worksheet.

ParameterTypeDescription
destCellNameStringthe dest cell name.

moveTo()

moveTo()

refreshData()

Refreshes pivottable’s data and setting from it’s data source. We will gather data from data source to a pivot cache ,then calculate the data in the cache to the cells. This method is only used to gather all data to a pivot cache.

refreshData(option)

Refreshes pivottable’s data and setting from it’s data source with options.

ParameterTypeDescription
optionPivotTableRefreshOptionThe options for refreshing data source of pivot table.

removeField(fieldType, fieldName)

Removes a field from specific field area removeField(int, com.aspose.cells.PivotField)

ParameterTypeDescription
fieldTypeNumberPivotFieldType
fieldNameStringThe name in the base fields.

removeField(fieldType, baseFieldIndex)

Removes a field from specific field area removeField(int, com.aspose.cells.PivotField)

ParameterTypeDescription
fieldTypeNumberPivotFieldType
baseFieldIndexNumberThe field index in the base fields.

removeField(fieldType, pivotField)

Remove field from specific field area

ParameterTypeDescription
fieldTypeNumberPivotFieldType
pivotFieldPivotFieldthe field in the base fields.

selectArea()

setAllowMultipleFiltersPerField()

setAltTextDescription()

Gets the description of the alt text

setAltTextTitle()

Gets the title of the altertext

setAutoFormat()

Indicates whether the PivotTable report is automatically formatted. Checkbox “autoformat table " which is in pivottable option for Excel 2003

setAutoFormatType()

Gets and sets the auto format type of PivotTable. The value of the property is PivotTableAutoFormatType integer constant.PivotTableAutoFormatType

setAutoGroupField()

Sets auto field group by the PivotTable. baseFieldIndex - The row or column field index in the base fields NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

setAutoGroupField(pivotField)

Sets auto field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the specific fields

setAutofitColumnWidthOnUpdate()

Indicates whether autofitting column width on update

setColumnGrand()

Indicates whether the PivotTable report shows grand totals for columns.

setColumnHeaderCaption()

Gets the Column Header Caption of the PivotTable.

setCustomListSort()

Indicates whether consider built-in custom list when sort data

setDataFieldHeaderName()

Gets and sets the name of the value area field header in the PivotTable.

setDataSource()

Gets and sets the data source of the pivot table.

setDisplayErrorString()

Indicates whether the PivotTable report displays a custom string in cells that contain errors.

setDisplayImmediateItems()

Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. The default value is true.

setDisplayNullString()

Indicates whether the PivotTable report displays a custom string if the value is null.

setEnableDataValueEditing()

Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottable. Enable cell editing in the values area

setEnableDrilldown()

Gets whether drilldown is enabled.

setEnableFieldDialog()

Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field.

setEnableFieldList()

Gets whether enable the field list for the PivotTable.

setEnableWizard()

Indicates whether the PivotTable Wizard is available.

setErrorString()

Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string.

setExcel2003Compatible()

Specifies whether the PivotTable is compatible for Excel2003 when refreshing PivotTable, if true, a string must be less than or equal to 255 characters, so if the string is greater than 255 characters, it will be truncated. if false, a string will not have the aforementioned restriction. The default value is true.

setFieldListSortAscending()

Indicates whether fields in the PivotTable are sorted in non-default order in the field list.

setGrandTotalName()

Returns the text string label that is displayed in the grand total column or row heading. The default value is the string “Grand Total”.

setGridDropZones()

Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid)

setHasBlankRows()

Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add blank rows.

setIndent()

Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.

setItemPrintTitles()

Indicates whether PivotItem names should be repeated at the top of each printed page.

setManualGroupField(baseFieldIndex, startVal, endVal, groupByList, intervalNum)

Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
baseFieldIndexNumberThe row or column field index in the base fields
startValNumberSpecifies the starting value for numeric grouping.
endValNumberSpecifies the ending value for numeric grouping.
groupByListArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumNumberSpecifies the interval number group by numeric grouping.

setManualGroupField(pivotField, startVal, endVal, groupByList, intervalNum)

Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the base fields
startValNumberSpecifies the starting value for numeric grouping.
endValNumberSpecifies the ending value for numeric grouping.
groupByListArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumNumberSpecifies the interval number group by numeric grouping.

setManualGroupField(baseFieldIndex, startVal, endVal, groupByList, intervalNum)

Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
baseFieldIndexNumberThe row or column field index in the base fields
startValDateTimeSpecifies the starting value for date grouping.
endValDateTimeSpecifies the ending value for date grouping.
groupByListArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumNumberSpecifies the interval number group by in days grouping.The number of days must be positive integer of nonzero

setManualGroupField(pivotField, startVal, endVal, groupByList, intervalNum)

Sets manual field group by the PivotTable. NOTE: This method is now obsolete. Instead, please use PivotField.GroupBy() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the base fields
startValDateTimeSpecifies the starting value for date grouping.
endValDateTimeSpecifies the ending value for date grouping.
groupByListArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumNumberSpecifies the interval number group by in days grouping.The number of days must be positive integer of nonzero

setManualUpdate()

Indicates whether the PivotTable report is recalculated only at the user’s request.

setMergeLabels()

True if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells.

setMissingItemsLimit()

Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. The value of the property is PivotMissingItemLimitType integer constant.

setMultipleFieldFilters()

Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.

setName()

Gets the name of the PivotTable

setNullString()

Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default value is an empty string.

setPageFieldOrder()

Gets the order in which page fields are added to the PivotTable report’s layout. The value of the property is PrintOrderType integer constant.

setPageFieldWrapCount()

Gets the number of page fields in each column or row in the PivotTable report.

setPivotTableStyle()

setPivotTableStyleName()

Gets and sets the pivottable style name.

setPivotTableStyleType()

Gets and sets the built-in pivot table style. The value of the property is PivotTableStyleType integer constant.

setPreserveFormatting()

Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.

setPrintDrill()

Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when displayed on pivottable.

setPrintTitles()

Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false.

setRefreshDataFlag()

Indicates whether Refreshing Data or not.

setRefreshDataOnOpeningFile()

Indicates whether Refresh Data when Opening File.

setRepeatItemsOnEachPrintedPage()

setRowGrand()

Indicates whether the PivotTable report shows grand totals for rows.

setRowHeaderCaption()

Gets the Row Header Caption of the PivotTable.

setSaveData()

Indicates whether data for the PivotTable report is saved with the workbook.

setSelected()

Indicates whether this PivotTable is selected.

setShowColumnGrandTotals()

setShowDataTips()

Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.

setShowDrill()

Gets and sets whether showing expand/collapse buttons.

setShowEmptyCol()

Specifies a boolean value that indicates whether to include empty columns in the table

setShowEmptyRow()

Specifies a boolean value that indicates whether to include empty rows in the table.

setShowMemberPropertyTips()

Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.

setShowPivotStyleColumnHeader()

Indicates whether the column header in the pivot table should have the style applied.

setShowPivotStyleColumnStripes()

Indicates whether stripe formatting is applied for column.

setShowPivotStyleLastColumn()

Indicates whether the column formatting is applied.

setShowPivotStyleRowHeader()

Indicates whether the row header in the pivot table should have the style applied.

setShowPivotStyleRowStripes()

Indicates whether row stripe formatting is applied.

setShowRowGrandTotals()

setShowRowHeaderCaption()

Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs

setShowValuesRow()

Specifies a boolean value that indicates whether show values row. show the values row

setSubtotalHiddenPageItems()

Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals. The default value is False.

setTag()

Gets a string saved with the PivotTable report.

setUngroup(baseFieldIndex)

Sets ungroup by the PivotTable NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
baseFieldIndexNumberThe row or column field index in the base fields

setUngroup(pivotField)

Sets ungroup by the PivotTable NOTE: This method is now obsolete. Instead, please use PivotField.Ungroup() method. This method will be removed 12 months later since October 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the base fields

showDetail()

showInCompactForm()

Layouts the PivotTable in compact form.

showInOutlineForm()

Layouts the PivotTable in outline form.

showInTabularForm()

Layouts the PivotTable in tabular form.

showReportFilterPage(pageField)

Show all the report filter pages according to PivotField, the PivotField must be located in the PageFields.

ParameterTypeDescription
pageFieldPivotFieldThe PivotField object

showReportFilterPageByIndex(posIndex)

Show all the report filter pages according to the position index in the PageFields

ParameterTypeDescription
posIndexNumberThe position index in the PageFields

showReportFilterPageByName(fieldName)

Show all the report filter pages according to PivotField’s name, the PivotField must be located in the PageFields.

ParameterTypeDescription
fieldNameStringThe name of PivotField