PivotTable

Inheritance: java.lang.Object

public class PivotTable

Summary description for PivotTable.

Example

         Workbook book = new Workbook();
         Worksheet sheet = book.getWorksheets().get(0);
         Cells cells = sheet.getCells();
         cells.get(0, 0).setValue("fruit");
         cells.get(1, 0).setValue("grape");
         cells.get(2, 0).setValue("blueberry");
         cells.get(3, 0).setValue("kiwi");
         cells.get(4, 0).setValue("cherry");
         cells.get(5, 0).setValue("grape");
         cells.get(6, 0).setValue("blueberry");
         cells.get(7, 0).setValue("kiwi");
         cells.get(8, 0).setValue("cherry");
 
         cells.get(0, 1).setValue("year");
         cells.get(1, 1).setValue(2020);
         cells.get(2, 1).setValue(2020);
         cells.get(3, 1).setValue(2020);
         cells.get(4, 1).setValue(2020);
         cells.get(5, 1).setValue(2021);
         cells.get(6, 1).setValue(2021);
         cells.get(7, 1).setValue(2021);
         cells.get(8, 1).setValue(2021);
 
         cells.get(0, 2).setValue("amount");
         cells.get(1, 2).setValue(50);
         cells.get(2, 2).setValue(60);
         cells.get(3, 2).setValue(70);
         cells.get(4, 2).setValue(80);
         cells.get(5, 2).setValue(90);
         cells.get(6, 2).setValue(100);
         cells.get(7, 2).setValue(110);
         cells.get(8, 2).setValue(120);
 
         PivotTableCollection pivots = sheet.getPivotTables();
 
         int pivotIndex = pivots.add("=Sheet1!A1:C9", "A12", "TestPivotTable");
         PivotTable pivot = pivots.get(pivotIndex);
         pivot.addFieldToArea(PivotFieldType.ROW, "fruit");
         pivot.addFieldToArea(PivotFieldType.COLUMN, "year");
         pivot.addFieldToArea(PivotFieldType.DATA, "amount");
 
         pivot.setPivotTableStyleType(PivotTableStyleType.PIVOT_TABLE_STYLE_MEDIUM_10);
 
         //Change PivotField's attributes
         PivotField rowField = pivot.getRowFields().get(0);
         rowField.setDisplayName("custom display name");
 
         //Add PivotFilter
         int index = pivot.getPivotFilters().add(0, PivotFilterType.COUNT);
         PivotFilter filter = pivot.getPivotFilters().get(index);
         filter.getAutoFilter().filterTop10(0, false, false, 2);
 
         //Add PivotFormatCondition
         int formatIndex = pivot.getPivotFormatConditions().add();
         PivotFormatCondition pfc = pivot.getPivotFormatConditions().get(formatIndex);
         FormatConditionCollection fcc = pfc.getFormatConditions();
         fcc.addArea(pivot.getDataBodyRange());
         int idx = fcc.addCondition(FormatConditionType.CELL_VALUE);
         FormatCondition fc = fcc.get(idx);
         fc.setFormula1("100");
         fc.setOperator(OperatorType.GREATER_OR_EQUAL);
         fc.getStyle().setBackgroundColor(Color.getRed());
 
         pivot.refreshData();
         pivot.calculateData();
 
         //do your business
 
         book.save("out.xlsx");

Methods

MethodDescription
addCalculatedField(String name, String formula)Adds a calculated field to pivot field and drag it to data area.
addCalculatedField(String name, String formula, boolean dragToDataArea)Adds a calculated field to pivot field.
addFieldToArea(int fieldType, PivotField pivotField)Adds the field to the specific area.
addFieldToArea(int fieldType, int baseFieldIndex)Adds the field to the specific area.
addFieldToArea(int fieldType, String fieldName)Adds the field to the specific area.
calculateData()Calculates pivottable’s data to cells.
calculateData(PivotTableCalculateOption option)Calculating pivot tables with options
calculateRange()Calculates pivottable’s range.
changeDataSource(String[] source)Set pivottable’s source data.
clearData()Clear PivotTable’s data and formatting
copyStyle(PivotTable pivotTable)Copies named style from another pivot table.
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
fields(int fieldType)Gets the specific fields by the field type.
format(PivotArea pivotArea, Style style)Formats selected area of the PivotTable.
format(int row, int column, Style style)Format the cell in the pivottable area
formatAll(Style style)Format all the cell in the pivottable area
formatRow(int row, Style style)Format the row data in the pivottable area
getAltTextDescription()Gets the description of the alt text.
getAltTextTitle()Gets the title of the alter text.
getAutoFormatType()Gets the auto format type of PivotTable.
getAutofitColumnWidthOnUpdate()Indicates whether autofitting column width on update
getBaseFields()Returns all base pivot fields in the PivotTable.
getCellByDisplayName(String 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.
getClass()
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.
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.
getDataField()Gets a PivotField object that represents all the data fields in a PivotTable.
getDataFieldHeaderName()Gets 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.
getDataSource()Gets the data source of the pivot table.
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.
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.
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(int fieldType)Gets the specific pivot field list by the region.
getGrandTotalName()Returns the text string label that is displayed in the grand total column or row heading.
getHorizontalBreaks()get pivot table row index list of horizontal pagebreaks
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.
getName()Gets the name of the PivotTable
getNamesOfSourceDataConnections()Gets the name of external source data connections.
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.
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.
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.
getPivotTableStyleName()Gets the pivottable style name.
getPivotTableStyleType()Gets the built-in pivot table style.
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.
getPrintTitles()Indicates whether the print titles for the worksheet are set based on the PivotTable report.
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()Indicates whether pivot item captions on the row area are repeated on each printed page for pivot fields in tabular form.
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.
getSaveData()Indicates whether data for the PivotTable report is saved with the workbook.
getShowDataTips()Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
getShowDrill()Gets 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.
getShowRowHeaderCaption()Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs
getShowValuesRow()Indicates whether showing values row.
getSource()Get pivottable’s source data.
getSourceDataConnections()Gets the external connection data sources.
getSourceType()Gets the data source type of the pivot table.
getSubtotalHiddenPageItems()Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals.
getTableRange1()Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn’t include page fields.
getTableRange2()Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields.
getTag()Gets a string saved with the PivotTable report.
hasBlankRows()Indicates whether to add blank rows.
hashCode()
isAutoFormat()Indicates whether the PivotTable report is automatically formatted.
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.
isGridDropZones()Indicates whether the PivotTable report displays classic pivottable layout.
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(int row, int column)Moves the PivotTable to a different location in the worksheet.
move(String destCellName)Moves the PivotTable to a different location in the worksheet.
notify()
notifyAll()
refreshData()Refreshes pivottable’s data and setting from it’s data source.
refreshData(PivotTableRefreshOption option)Refreshes pivottable’s data and setting from it’s data source with options.
removeField(int fieldType, PivotField pivotField)Remove field from specific field area
removeField(int fieldType, int baseFieldIndex)Removes a field from specific field area
removeField(int fieldType, String fieldName)Removes a field from specific field area
setAltTextDescription(String value)Gets the description of the alt text.
setAltTextTitle(String value)Sets the title of the alter text.
setAutoFormat(boolean value)Indicates whether the PivotTable report is automatically formatted.
setAutoFormatType(int value)Sets the auto format type of PivotTable.
setAutoGroupField(PivotField pivotField)Sets auto field group by the PivotTable.
setAutoGroupField(int baseFieldIndex)Sets auto field group by the PivotTable.
setAutofitColumnWidthOnUpdate(boolean value)Indicates whether autofitting column width on update
setColumnGrand(boolean value)Indicates whether the PivotTable report shows grand totals for columns.
setColumnHeaderCaption(String value)Gets the Column Header Caption of the PivotTable.
setCustomListSort(boolean value)Indicates whether consider built-in custom list when sort data
setDataFieldHeaderName(String value)Sets the name of the value area field header in the PivotTable.
setDataSource(String[] value)Sets the data source of the pivot table.
setDisplayErrorString(boolean value)Indicates whether the PivotTable report displays a custom string in cells that contain errors.
setDisplayImmediateItems(boolean value)Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty.
setDisplayNullString(boolean value)Indicates whether the PivotTable report displays a custom string if the value is null.
setEnableDataValueEditing(boolean value)Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the pivottable.
setEnableDrilldown(boolean value)Gets whether drilldown is enabled.
setEnableFieldDialog(boolean value)Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field.
setEnableFieldList(boolean value)Gets whether enable the field list for the PivotTable.
setEnableWizard(boolean value)Indicates whether the PivotTable Wizard is available.
setErrorString(String value)Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string.
setExcel2003Compatible(boolean value)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.
setFieldListSortAscending(boolean value)Indicates whether fields in the PivotTable are sorted in non-default order in the field list.
setGrandTotalName(String value)Returns the text string label that is displayed in the grand total column or row heading.
setGridDropZones(boolean value)Indicates whether the PivotTable report displays classic pivottable layout.
setHasBlankRows(boolean value)Indicates whether to add blank rows.
setIndent(int value)Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.
setItemPrintTitles(boolean value)Indicates whether PivotItem names should be repeated at the top of each printed page.
setManualGroupField(PivotField pivotField, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)Sets manual field group by the PivotTable.
setManualGroupField(PivotField pivotField, double startVal, double endVal, ArrayList groupByList, double intervalNum)Sets manual field group by the PivotTable.
setManualGroupField(int baseFieldIndex, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)Sets manual field group by the PivotTable.
setManualGroupField(int baseFieldIndex, double startVal, double endVal, ArrayList groupByList, double intervalNum)Sets manual field group by the PivotTable.
setManualUpdate(boolean value)Indicates whether the PivotTable report is recalculated only at the user’s request.
setMergeLabels(boolean value)True if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells.
setMissingItemsLimit(int value)Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.
setMultipleFieldFilters(boolean value)Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.
setName(String value)Gets the name of the PivotTable
setNullString(String value)Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default value is an empty string.
setPageFieldOrder(int value)Sets the order in which page fields are added to the PivotTable report’s layout.
setPageFieldWrapCount(int value)Gets the number of page fields in each column or row in the PivotTable report.
setPivotTableStyleName(String value)Sets the pivottable style name.
setPivotTableStyleType(int value)Sets the built-in pivot table style.
setPreserveFormatting(boolean value)Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.
setPrintDrill(boolean value)Specifies a boolean value that indicates whether drill indicators should be printed.
setPrintTitles(boolean value)Indicates whether the print titles for the worksheet are set based on the PivotTable report.
setRefreshDataFlag(boolean value)Indicates whether Refreshing Data or not.
setRefreshDataOnOpeningFile(boolean value)Indicates whether Refresh Data when Opening File.
setRepeatItemsOnEachPrintedPage(boolean value)Indicates whether pivot item captions on the row area are repeated on each printed page for pivot fields in tabular form.
setRowGrand(boolean value)Indicates whether the PivotTable report shows grand totals for rows.
setRowHeaderCaption(String value)Gets the Row Header Caption of the PivotTable.
setSaveData(boolean value)Indicates whether data for the PivotTable report is saved with the workbook.
setSelected(boolean value)Indicates whether this PivotTable is selected.
setShowDataTips(boolean value)Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
setShowDrill(boolean value)Sets whether showing expand/collapse buttons.
setShowEmptyCol(boolean value)Specifies a boolean value that indicates whether to include empty columns in the table
setShowEmptyRow(boolean value)Specifies a boolean value that indicates whether to include empty rows in the table.
setShowMemberPropertyTips(boolean value)Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.
setShowPivotStyleColumnHeader(boolean value)Indicates whether the column header in the pivot table should have the style applied.
setShowPivotStyleColumnStripes(boolean value)Indicates whether stripe formatting is applied for column.
setShowPivotStyleLastColumn(boolean value)Indicates whether the column formatting is applied.
setShowPivotStyleRowHeader(boolean value)Indicates whether the row header in the pivot table should have the style applied.
setShowPivotStyleRowStripes(boolean value)Indicates whether row stripe formatting is applied.
setShowRowHeaderCaption(boolean value)Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs
setShowValuesRow(boolean value)Indicates whether showing values row.
setSubtotalHiddenPageItems(boolean value)Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals.
setTag(String value)Gets a string saved with the PivotTable report.
setUngroup(PivotField pivotField)Sets ungroup by the PivotTable
setUngroup(int baseFieldIndex)Sets ungroup by the PivotTable
showDetail(int rowOffset, int columnOffset, boolean newSheet, int destRow, int destColumn)Show the detail of one item in the data region to a new Table.
showInCompactForm()Layouts the PivotTable in compact form.
showInOutlineForm()Layouts the PivotTable in outline form.
showInTabularForm()Layouts the PivotTable in tabular form.
showReportFilterPage(PivotField pageField)Show all the report filter pages according to PivotField, the PivotField must be located in the PageFields.
showReportFilterPageByIndex(int posIndex)Show all the report filter pages according to the position index in the PageFields
showReportFilterPageByName(String fieldName)Show all the report filter pages according to PivotField’s name, the PivotField must be located in the PageFields.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

addCalculatedField(String name, String formula)

public void addCalculatedField(String name, String formula)

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

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the calculated field
formulajava.lang.StringThe formula of the calculated field.

addCalculatedField(String name, String formula, boolean dragToDataArea)

public void addCalculatedField(String name, String formula, boolean dragToDataArea)

Adds a calculated field to pivot field.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the calculated field
formulajava.lang.StringThe formula of the calculated field.
dragToDataAreabooleanTrue,drag this field to data area immediately

addFieldToArea(int fieldType, PivotField pivotField)

public int addFieldToArea(int fieldType, PivotField pivotField)

Adds the field to the specific area.

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. the fields area type.
pivotFieldPivotFieldthe field in the base fields.

Returns: int - the field position in the specific fields.

addFieldToArea(int fieldType, int baseFieldIndex)

public int addFieldToArea(int fieldType, int baseFieldIndex)

Adds the field to the specific area.

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. The fields area type.
baseFieldIndexintThe field index in the base fields.

Returns: int - The field position in the specific fields.

addFieldToArea(int fieldType, String fieldName)

public int addFieldToArea(int fieldType, String fieldName)

Adds the field to the specific area.

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. The fields area type.
fieldNamejava.lang.StringThe name in the base fields.

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

calculateData()

public void calculateData()

Calculates pivottable’s data to cells.

Remarks

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(PivotTableCalculateOption option)

public void calculateData(PivotTableCalculateOption option)

Calculating pivot tables with options

Parameters:

ParameterTypeDescription
optionPivotTableCalculateOption

calculateRange()

public void calculateRange()

Calculates pivottable’s range.

Remarks

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

changeDataSource(String[] source)

public void changeDataSource(String[] source)

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

Parameters:

ParameterTypeDescription
sourcejava.lang.String[]

clearData()

public void clearData()

Clear PivotTable’s data and formatting

Remarks

If this method is not called before you add or delete PivotField, Maybe the PivotTable data is not corrected

copyStyle(PivotTable pivotTable)

public void copyStyle(PivotTable pivotTable)

Copies named style from another pivot table.

Parameters:

ParameterTypeDescription
pivotTablePivotTableSource pivot table.

dispose()

public void dispose()

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

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fields(int fieldType)

public PivotFieldCollection fields(int fieldType)

Gets the specific fields by the field type.

Remarks

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.

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. the field type.

Returns: PivotFieldCollection - the specific field collection

format(PivotArea pivotArea, Style style)

public void format(PivotArea pivotArea, Style style)

Formats selected area of the PivotTable.

Parameters:

ParameterTypeDescription
pivotAreaPivotArea
styleStyle

format(int row, int column, Style style)

public void format(int row, int column, Style style)

Format the cell in the pivottable area

Parameters:

ParameterTypeDescription
rowintRow Index of the cell
columnintColumn index of the cell
styleStyleStyle which is to format the cell

formatAll(Style style)

public void formatAll(Style style)

Format all the cell in the pivottable area

Parameters:

ParameterTypeDescription
styleStyleStyle which is to format

formatRow(int row, Style style)

public void formatRow(int row, Style style)

Format the row data in the pivottable area

Parameters:

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

getAltTextDescription()

public String getAltTextDescription()

Gets the description of the alt text.

Returns: java.lang.String

getAltTextTitle()

public String getAltTextTitle()

Gets the title of the alter text.

Returns: java.lang.String

getAutoFormatType()

public int getAutoFormatType()

Gets the auto format type of PivotTable.

See PivotTableAutoFormatType.

Returns: int

getAutofitColumnWidthOnUpdate()

public boolean getAutofitColumnWidthOnUpdate()

Indicates whether autofitting column width on update

Returns: boolean

getBaseFields()

public PivotFieldCollection getBaseFields()

Returns all base pivot fields in the PivotTable.

Returns: PivotFieldCollection

getCellByDisplayName(String displayName)

public Cell getCellByDisplayName(String displayName)

Gets the Cell object by the display name of PivotField.

Parameters:

ParameterTypeDescription
displayNamejava.lang.Stringthe DisplayName of PivotField

Returns: Cell - the Cell object

getChildren()

public PivotTable[] getChildren()

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

Returns: com.aspose.cells.PivotTable[] - the PivotTable array object

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColumnFields()

public PivotFieldCollection getColumnFields()

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

Returns: PivotFieldCollection

getColumnGrand()

public boolean getColumnGrand()

Indicates whether the PivotTable report shows grand totals for columns.

Returns: boolean

getColumnHeaderCaption()

public String getColumnHeaderCaption()

Gets the Column Header Caption of the PivotTable.

Returns: java.lang.String

getColumnRange()

public CellArea getColumnRange()

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

Returns: CellArea

getCustomListSort()

public boolean getCustomListSort()

Indicates whether consider built-in custom list when sort data

Returns: boolean

getDataBodyRange()

public CellArea 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.

Returns: CellArea

getDataField()

public PivotField 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 .

Returns: PivotField

getDataFieldHeaderName()

public String getDataFieldHeaderName()

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

Returns: java.lang.String

getDataFields()

public PivotFieldCollection 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.

Returns: PivotFieldCollection

getDataSource()

public String[] getDataSource()

Gets the data source of the pivot table.

Returns: java.lang.String[]

getDisplayErrorString()

public boolean getDisplayErrorString()

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

Returns: boolean

getDisplayImmediateItems()

public boolean 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.

Returns: boolean

getDisplayNullString()

public boolean getDisplayNullString()

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

Returns: boolean

getEnableDataValueEditing()

public boolean 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

Returns: boolean

getEnableDrilldown()

public boolean getEnableDrilldown()

Gets whether drilldown is enabled.

Returns: boolean

getEnableFieldDialog()

public boolean getEnableFieldDialog()

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

Returns: boolean

getEnableFieldList()

public boolean getEnableFieldList()

Gets whether enable the field list for the PivotTable.

Returns: boolean

getEnableWizard()

public boolean getEnableWizard()

Indicates whether the PivotTable Wizard is available.

Returns: boolean

getErrorString()

public String getErrorString()

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

Returns: java.lang.String

getExternalConnectionDataSource()

public ExternalConnection getExternalConnectionDataSource()

Gets the external connection data source.

Remarks

NOTE: This property is now obsolete. Instead, please use pivotTable.GetSourceDataConnections() method. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.

Returns: ExternalConnection

getFieldListSortAscending()

public boolean getFieldListSortAscending()

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

Returns: boolean

getFields(int fieldType)

public PivotFieldCollection getFields(int fieldType)

Gets the specific pivot field list by the region.

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. the region type.

Returns: PivotFieldCollection - the specific pivot field collection

getGrandTotalName()

public String 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”.

Returns: java.lang.String

getHorizontalBreaks()

public ArrayList getHorizontalBreaks()

get pivot table row index list of horizontal pagebreaks

Returns: java.util.ArrayList -

getIndent()

public int getIndent()

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

Returns: int

getItemPrintTitles()

public boolean getItemPrintTitles()

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

Remarks

NOTE: This property is now obsolete. Instead, please use PivotTable.RepeatItemsOnEachPrintedPage property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.

Returns: boolean

getManualUpdate()

public boolean getManualUpdate()

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

Returns: boolean

getMergeLabels()

public boolean getMergeLabels()

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

Returns: boolean

getMissingItemsLimit()

public int getMissingItemsLimit()

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

See PivotMissingItemLimitType.

Returns: int

getName()

public String getName()

Gets the name of the PivotTable

Returns: java.lang.String

getNamesOfSourceDataConnections()

public String[] getNamesOfSourceDataConnections()

Gets the name of external source data connections.

Returns: java.lang.String[]

getNullString()

public String getNullString()

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

Returns: java.lang.String

getPageFieldOrder()

public int getPageFieldOrder()

Gets the order in which page fields are added to the PivotTable report’s layout.

See PrintOrderType.

Returns: int

getPageFieldWrapCount()

public int getPageFieldWrapCount()

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

Returns: int

getPageFields()

public PivotFieldCollection getPageFields()

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

Returns: PivotFieldCollection

getPivotFilters()

public PivotFilterCollection getPivotFilters()

Returns a list of pivot filters.

Returns: PivotFilterCollection

getPivotFormatConditions()

public PivotFormatConditionCollection getPivotFormatConditions()

Gets the Format Conditions of the pivot table.

Returns: PivotFormatConditionCollection

getPivotFormats()

public PivotTableFormatCollection getPivotFormats()

Gets the collection of formats applied to PivotTable.

Returns: PivotTableFormatCollection

getPivotTableStyleName()

public String getPivotTableStyleName()

Gets the pivottable style name.

Returns: java.lang.String

getPivotTableStyleType()

public int getPivotTableStyleType()

Gets the built-in pivot table style.

See PivotTableStyleType.

Returns: int

getPreserveFormatting()

public boolean getPreserveFormatting()

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

Returns: boolean

getPrintDrill()

public boolean getPrintDrill()

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

Returns: boolean

getPrintTitles()

public boolean getPrintTitles()

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

Returns: boolean

getRefreshDataFlag()

public boolean getRefreshDataFlag()

Indicates whether Refreshing Data or not.

Returns: boolean

getRefreshDataOnOpeningFile()

public boolean getRefreshDataOnOpeningFile()

Indicates whether Refresh Data when Opening File.

Returns: boolean

getRefreshDate()

public DateTime getRefreshDate()

Gets the last date time when the PivotTable was refreshed.

Returns: DateTime

getRefreshedByWho()

public String getRefreshedByWho()

Gets the name of the last user who refreshed this PivotTable

Returns: java.lang.String

getRepeatItemsOnEachPrintedPage()

public boolean getRepeatItemsOnEachPrintedPage()

Indicates whether pivot item captions on the row area are repeated on each printed page for pivot fields in tabular form.

Returns: boolean

getRowFields()

public PivotFieldCollection getRowFields()

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

Returns: PivotFieldCollection

getRowGrand()

public boolean getRowGrand()

Indicates whether the PivotTable report shows grand totals for rows.

Returns: boolean

getRowHeaderCaption()

public String getRowHeaderCaption()

Gets the Row Header Caption of the PivotTable.

Returns: java.lang.String

getRowRange()

public CellArea getRowRange()

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

Returns: CellArea

getSaveData()

public boolean getSaveData()

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

Returns: boolean

getShowDataTips()

public boolean getShowDataTips()

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

Returns: boolean

getShowDrill()

public boolean getShowDrill()

Gets whether showing expand/collapse buttons.

Returns: boolean

getShowEmptyCol()

public boolean getShowEmptyCol()

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

Returns: boolean

getShowEmptyRow()

public boolean getShowEmptyRow()

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

Returns: boolean

getShowMemberPropertyTips()

public boolean getShowMemberPropertyTips()

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

Returns: boolean

getShowPivotStyleColumnHeader()

public boolean getShowPivotStyleColumnHeader()

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

Returns: boolean

getShowPivotStyleColumnStripes()

public boolean getShowPivotStyleColumnStripes()

Indicates whether stripe formatting is applied for column.

Returns: boolean

getShowPivotStyleLastColumn()

public boolean getShowPivotStyleLastColumn()

Indicates whether the column formatting is applied.

Returns: boolean

getShowPivotStyleRowHeader()

public boolean getShowPivotStyleRowHeader()

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

Returns: boolean

getShowPivotStyleRowStripes()

public boolean getShowPivotStyleRowStripes()

Indicates whether row stripe formatting is applied.

Returns: boolean

getShowRowHeaderCaption()

public boolean getShowRowHeaderCaption()

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

Returns: boolean

getShowValuesRow()

public boolean getShowValuesRow()

Indicates whether showing values row.

Returns: boolean

getSource()

public String[] getSource()

Get pivottable’s source data.

Returns: java.lang.String[]

getSourceDataConnections()

public ExternalConnection[] getSourceDataConnections()

Gets the external connection data sources.

Returns: com.aspose.cells.ExternalConnection[]

getSourceType()

public byte getSourceType()

Gets the data source type of the pivot table.

See PivotTableSourceType.

Returns: byte

getSubtotalHiddenPageItems()

public boolean 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.

Returns: boolean

getTableRange1()

public CellArea getTableRange1()

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

Returns: CellArea

getTableRange2()

public CellArea getTableRange2()

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

Returns: CellArea

getTag()

public String getTag()

Gets a string saved with the PivotTable report.

Returns: java.lang.String

hasBlankRows()

public boolean hasBlankRows()

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

Returns: boolean

hashCode()

public native int hashCode()

Returns: int

isAutoFormat()

public boolean isAutoFormat()

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

Returns: boolean

isExcel2003Compatible()

public boolean 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.

Returns: boolean

isGridDropZones()

public boolean isGridDropZones()

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

Returns: boolean

isMultipleFieldFilters()

public boolean isMultipleFieldFilters()

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

Returns: boolean

isSelected()

public boolean isSelected()

Indicates whether this PivotTable is selected.

Returns: boolean

move(int row, int column)

public void move(int row, int column)

Moves the PivotTable to a different location in the worksheet.

Parameters:

ParameterTypeDescription
rowintrow index.
columnintcolumn index.

move(String destCellName)

public void move(String destCellName)

Moves the PivotTable to a different location in the worksheet.

Parameters:

ParameterTypeDescription
destCellNamejava.lang.Stringthe dest cell name.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

refreshData()

public int refreshData()

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

Remarks

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.

Returns: int

refreshData(PivotTableRefreshOption option)

public int refreshData(PivotTableRefreshOption option)

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

Parameters:

ParameterTypeDescription
optionPivotTableRefreshOptionThe options for refreshing data source of pivot table.

Returns: int

removeField(int fieldType, PivotField pivotField)

public void removeField(int fieldType, PivotField pivotField)

Remove field from specific field area

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. the fields area type.
pivotFieldPivotFieldthe field in the base fields.

removeField(int fieldType, int baseFieldIndex)

public void removeField(int fieldType, int baseFieldIndex)

Removes a field from specific field area

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. The fields area type.
baseFieldIndexintThe field index in the base fields.

removeField(int fieldType, String fieldName)

public void removeField(int fieldType, String fieldName)

Removes a field from specific field area

Parameters:

ParameterTypeDescription
fieldTypeintPivotFieldType. The fields area type.
fieldNamejava.lang.StringThe name in the base fields.

setAltTextDescription(String value)

public void setAltTextDescription(String value)

Gets the description of the alt text.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAltTextTitle(String value)

public void setAltTextTitle(String value)

Sets the title of the alter text.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAutoFormat(boolean value)

public void setAutoFormat(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setAutoFormatType(int value)

public void setAutoFormatType(int value)

Sets the auto format type of PivotTable.

See PivotTableAutoFormatType.

Parameters:

ParameterTypeDescription
valueint

setAutoGroupField(PivotField pivotField)

public void setAutoGroupField(PivotField pivotField)

Sets auto field group by the PivotTable.

Remarks

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.

Parameters:

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the specific fields

setAutoGroupField(int baseFieldIndex)

public void setAutoGroupField(int baseFieldIndex)

Sets auto field group by the PivotTable.

Remarks

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.

Parameters:

ParameterTypeDescription
baseFieldIndexintThe row or column field index in the base fields

setAutofitColumnWidthOnUpdate(boolean value)

public void setAutofitColumnWidthOnUpdate(boolean value)

Indicates whether autofitting column width on update

Parameters:

ParameterTypeDescription
valueboolean

setColumnGrand(boolean value)

public void setColumnGrand(boolean value)

Indicates whether the PivotTable report shows grand totals for columns.

Parameters:

ParameterTypeDescription
valueboolean

setColumnHeaderCaption(String value)

public void setColumnHeaderCaption(String value)

Gets the Column Header Caption of the PivotTable.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setCustomListSort(boolean value)

public void setCustomListSort(boolean value)

Indicates whether consider built-in custom list when sort data

Parameters:

ParameterTypeDescription
valueboolean

setDataFieldHeaderName(String value)

public void setDataFieldHeaderName(String value)

Sets the name of the value area field header in the PivotTable.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setDataSource(String[] value)

public void setDataSource(String[] value)

Sets the data source of the pivot table.

Parameters:

ParameterTypeDescription
valuejava.lang.String[]

setDisplayErrorString(boolean value)

public void setDisplayErrorString(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setDisplayImmediateItems(boolean value)

public void setDisplayImmediateItems(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setDisplayNullString(boolean value)

public void setDisplayNullString(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setEnableDataValueEditing(boolean value)

public void setEnableDataValueEditing(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setEnableDrilldown(boolean value)

public void setEnableDrilldown(boolean value)

Gets whether drilldown is enabled.

Parameters:

ParameterTypeDescription
valueboolean

setEnableFieldDialog(boolean value)

public void setEnableFieldDialog(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setEnableFieldList(boolean value)

public void setEnableFieldList(boolean value)

Gets whether enable the field list for the PivotTable.

Parameters:

ParameterTypeDescription
valueboolean

setEnableWizard(boolean value)

public void setEnableWizard(boolean value)

Indicates whether the PivotTable Wizard is available.

Parameters:

ParameterTypeDescription
valueboolean

setErrorString(String value)

public void setErrorString(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

setExcel2003Compatible(boolean value)

public void setExcel2003Compatible(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setFieldListSortAscending(boolean value)

public void setFieldListSortAscending(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setGrandTotalName(String value)

public void setGrandTotalName(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

setGridDropZones(boolean value)

public void setGridDropZones(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setHasBlankRows(boolean value)

public void setHasBlankRows(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setIndent(int value)

public void setIndent(int value)

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

Parameters:

ParameterTypeDescription
valueint

setItemPrintTitles(boolean value)

public void setItemPrintTitles(boolean value)

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

Remarks

NOTE: This property is now obsolete. Instead, please use PivotTable.RepeatItemsOnEachPrintedPage property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueboolean

setManualGroupField(PivotField pivotField, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)

public void setManualGroupField(PivotField pivotField, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)

Sets manual field group by the PivotTable.

Remarks

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.

Parameters:

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

setManualGroupField(PivotField pivotField, double startVal, double endVal, ArrayList groupByList, double intervalNum)

public void setManualGroupField(PivotField pivotField, double startVal, double endVal, ArrayList groupByList, double intervalNum)

Sets manual field group by the PivotTable.

Remarks

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.

Parameters:

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the base fields
startValdoubleSpecifies the starting value for numeric grouping.
endValdoubleSpecifies the ending value for numeric grouping.
groupByListjava.util.ArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumdoubleSpecifies the interval number group by numeric grouping.

setManualGroupField(int baseFieldIndex, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)

public void setManualGroupField(int baseFieldIndex, DateTime startVal, DateTime endVal, ArrayList groupByList, int intervalNum)

Sets manual field group by the PivotTable.

Remarks

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.

Parameters:

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

setManualGroupField(int baseFieldIndex, double startVal, double endVal, ArrayList groupByList, double intervalNum)

public void setManualGroupField(int baseFieldIndex, double startVal, double endVal, ArrayList groupByList, double intervalNum)

Sets manual field group by the PivotTable.

Remarks

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.

Parameters:

ParameterTypeDescription
baseFieldIndexintThe row or column field index in the base fields
startValdoubleSpecifies the starting value for numeric grouping.
endValdoubleSpecifies the ending value for numeric grouping.
groupByListjava.util.ArrayListSpecifies the grouping type list. Specified by PivotTableGroupType
intervalNumdoubleSpecifies the interval number group by numeric grouping.

setManualUpdate(boolean value)

public void setManualUpdate(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setMergeLabels(boolean value)

public void setMergeLabels(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setMissingItemsLimit(int value)

public void setMissingItemsLimit(int value)

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

See PivotMissingItemLimitType.

Parameters:

ParameterTypeDescription
valueint

setMultipleFieldFilters(boolean value)

public void setMultipleFieldFilters(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setName(String value)

public void setName(String value)

Gets the name of the PivotTable

Parameters:

ParameterTypeDescription
valuejava.lang.String

setNullString(String value)

public void setNullString(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPageFieldOrder(int value)

public void setPageFieldOrder(int value)

Sets the order in which page fields are added to the PivotTable report’s layout.

See PrintOrderType.

Parameters:

ParameterTypeDescription
valueint

setPageFieldWrapCount(int value)

public void setPageFieldWrapCount(int value)

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

Parameters:

ParameterTypeDescription
valueint

setPivotTableStyleName(String value)

public void setPivotTableStyleName(String value)

Sets the pivottable style name.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPivotTableStyleType(int value)

public void setPivotTableStyleType(int value)

Sets the built-in pivot table style.

See PivotTableStyleType.

Parameters:

ParameterTypeDescription
valueint

setPreserveFormatting(boolean value)

public void setPreserveFormatting(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setPrintDrill(boolean value)

public void setPrintDrill(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setPrintTitles(boolean value)

public void setPrintTitles(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setRefreshDataFlag(boolean value)

public void setRefreshDataFlag(boolean value)

Indicates whether Refreshing Data or not.

Parameters:

ParameterTypeDescription
valueboolean

setRefreshDataOnOpeningFile(boolean value)

public void setRefreshDataOnOpeningFile(boolean value)

Indicates whether Refresh Data when Opening File.

Parameters:

ParameterTypeDescription
valueboolean

setRepeatItemsOnEachPrintedPage(boolean value)

public void setRepeatItemsOnEachPrintedPage(boolean value)

Indicates whether pivot item captions on the row area are repeated on each printed page for pivot fields in tabular form.

Parameters:

ParameterTypeDescription
valueboolean

setRowGrand(boolean value)

public void setRowGrand(boolean value)

Indicates whether the PivotTable report shows grand totals for rows.

Parameters:

ParameterTypeDescription
valueboolean

setRowHeaderCaption(String value)

public void setRowHeaderCaption(String value)

Gets the Row Header Caption of the PivotTable.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSaveData(boolean value)

public void setSaveData(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setSelected(boolean value)

public void setSelected(boolean value)

Indicates whether this PivotTable is selected.

Parameters:

ParameterTypeDescription
valueboolean

setShowDataTips(boolean value)

public void setShowDataTips(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowDrill(boolean value)

public void setShowDrill(boolean value)

Sets whether showing expand/collapse buttons.

Parameters:

ParameterTypeDescription
valueboolean

setShowEmptyCol(boolean value)

public void setShowEmptyCol(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowEmptyRow(boolean value)

public void setShowEmptyRow(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowMemberPropertyTips(boolean value)

public void setShowMemberPropertyTips(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowPivotStyleColumnHeader(boolean value)

public void setShowPivotStyleColumnHeader(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowPivotStyleColumnStripes(boolean value)

public void setShowPivotStyleColumnStripes(boolean value)

Indicates whether stripe formatting is applied for column.

Parameters:

ParameterTypeDescription
valueboolean

setShowPivotStyleLastColumn(boolean value)

public void setShowPivotStyleLastColumn(boolean value)

Indicates whether the column formatting is applied.

Parameters:

ParameterTypeDescription
valueboolean

setShowPivotStyleRowHeader(boolean value)

public void setShowPivotStyleRowHeader(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowPivotStyleRowStripes(boolean value)

public void setShowPivotStyleRowStripes(boolean value)

Indicates whether row stripe formatting is applied.

Parameters:

ParameterTypeDescription
valueboolean

setShowRowHeaderCaption(boolean value)

public void setShowRowHeaderCaption(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setShowValuesRow(boolean value)

public void setShowValuesRow(boolean value)

Indicates whether showing values row.

Parameters:

ParameterTypeDescription
valueboolean

setSubtotalHiddenPageItems(boolean value)

public void setSubtotalHiddenPageItems(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setTag(String value)

public void setTag(String value)

Gets a string saved with the PivotTable report.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setUngroup(PivotField pivotField)

public void setUngroup(PivotField pivotField)

Sets ungroup by the PivotTable

Remarks

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.

Parameters:

ParameterTypeDescription
pivotFieldPivotFieldThe row or column field in the base fields

setUngroup(int baseFieldIndex)

public void setUngroup(int baseFieldIndex)

Sets ungroup by the PivotTable

Remarks

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.

Parameters:

ParameterTypeDescription
baseFieldIndexintThe row or column field index in the base fields

showDetail(int rowOffset, int columnOffset, boolean newSheet, int destRow, int destColumn)

public void showDetail(int rowOffset, int columnOffset, boolean newSheet, int destRow, int destColumn)

Show the detail of one item in the data region to a new Table.

Parameters:

ParameterTypeDescription
rowOffsetintOffset to the first data row in the data region.
columnOffsetintOffset to the first data column in the data region.
newSheetbooleanShow the detail to a new worksheet.
destRowintThe target row.
destColumnintThe target column.

showInCompactForm()

public void showInCompactForm()

Layouts the PivotTable in compact form.

showInOutlineForm()

public void showInOutlineForm()

Layouts the PivotTable in outline form.

showInTabularForm()

public void showInTabularForm()

Layouts the PivotTable in tabular form.

showReportFilterPage(PivotField pageField)

public void showReportFilterPage(PivotField pageField)

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

Parameters:

ParameterTypeDescription
pageFieldPivotFieldThe PivotField object

showReportFilterPageByIndex(int posIndex)

public void showReportFilterPageByIndex(int posIndex)

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

Parameters:

ParameterTypeDescription
posIndexintThe position index in the PageFields

showReportFilterPageByName(String fieldName)

public void showReportFilterPageByName(String fieldName)

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

Parameters:

ParameterTypeDescription
fieldNamejava.lang.StringThe name of PivotField

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int