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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the calculated field |
formula | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the calculated field |
formula | java.lang.String | The formula of the calculated field. |
dragToDataArea | boolean | True,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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. the fields area type. |
pivotField | PivotField | the 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. The fields area type. |
baseFieldIndex | int | The 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. The fields area type. |
fieldName | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
option | PivotTableCalculateOption |
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:
Parameter | Type | Description |
---|---|---|
source | java.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:
Parameter | Type | Description |
---|---|---|
pivotTable | PivotTable | Source 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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. 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:
Parameter | Type | Description |
---|---|---|
pivotArea | PivotArea | |
style | Style |
format(int row, int column, Style style)
public void format(int row, int column, Style style)
Format the cell in the pivottable area
Parameters:
Parameter | Type | Description |
---|---|---|
row | int | Row Index of the cell |
column | int | Column index of the cell |
style | Style | Style which is to format the cell |
formatAll(Style style)
public void formatAll(Style style)
Format all the cell in the pivottable area
Parameters:
Parameter | Type | Description |
---|---|---|
style | Style | Style 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:
Parameter | Type | Description |
---|---|---|
row | int | Row Index of the Row object |
style | Style | Style 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.
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:
Parameter | Type | Description |
---|---|---|
displayName | java.lang.String | the 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. 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:
Parameter | Type | Description |
---|---|---|
row | int | row index. |
column | int | column index. |
move(String destCellName)
public void move(String destCellName)
Moves the PivotTable to a different location in the worksheet.
Parameters:
Parameter | Type | Description |
---|---|---|
destCellName | java.lang.String | the 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:
Parameter | Type | Description |
---|---|---|
option | PivotTableRefreshOption | The 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. the fields area type. |
pivotField | PivotField | the 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. The fields area type. |
baseFieldIndex | int | The 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:
Parameter | Type | Description |
---|---|---|
fieldType | int | PivotFieldType. The fields area type. |
fieldName | java.lang.String | The name in the base fields. |
setAltTextDescription(String value)
public void setAltTextDescription(String value)
Gets the description of the alt text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setAltTextTitle(String value)
public void setAltTextTitle(String value)
Sets the title of the alter text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setAutoFormatType(int value)
public void setAutoFormatType(int value)
Sets the auto format type of PivotTable.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
pivotField | PivotField | The 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:
Parameter | Type | Description |
---|---|---|
baseFieldIndex | int | The 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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setColumnGrand(boolean value)
public void setColumnGrand(boolean value)
Indicates whether the PivotTable report shows grand totals for columns.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setColumnHeaderCaption(String value)
public void setColumnHeaderCaption(String value)
Gets the Column Header Caption of the PivotTable.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setCustomListSort(boolean value)
public void setCustomListSort(boolean value)
Indicates whether consider built-in custom list when sort data
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setDataFieldHeaderName(String value)
public void setDataFieldHeaderName(String value)
Sets the name of the value area field header in the PivotTable.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setDataSource(String[] value)
public void setDataSource(String[] value)
Sets the data source of the pivot table.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setDisplayNullString(boolean value)
public void setDisplayNullString(boolean value)
Indicates whether the PivotTable report displays a custom string if the value is null.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnableDrilldown(boolean value)
public void setEnableDrilldown(boolean value)
Gets whether drilldown is enabled.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnableFieldList(boolean value)
public void setEnableFieldList(boolean value)
Gets whether enable the field list for the PivotTable.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnableWizard(boolean value)
public void setEnableWizard(boolean value)
Indicates whether the PivotTable Wizard is available.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
pivotField | PivotField | The row or column field in the base fields |
startVal | DateTime | Specifies the starting value for date grouping. |
endVal | DateTime | Specifies the ending value for date grouping. |
groupByList | java.util.ArrayList | Specifies the grouping type list. Specified by PivotTableGroupType |
intervalNum | int | Specifies 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:
Parameter | Type | Description |
---|---|---|
pivotField | PivotField | The row or column field in the base fields |
startVal | double | Specifies the starting value for numeric grouping. |
endVal | double | Specifies the ending value for numeric grouping. |
groupByList | java.util.ArrayList | Specifies the grouping type list. Specified by PivotTableGroupType |
intervalNum | double | Specifies 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:
Parameter | Type | Description |
---|---|---|
baseFieldIndex | int | The row or column field index in the base fields |
startVal | DateTime | Specifies the starting value for date grouping. |
endVal | DateTime | Specifies the ending value for date grouping. |
groupByList | java.util.ArrayList | Specifies the grouping type list. Specified by PivotTableGroupType |
intervalNum | int | Specifies 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:
Parameter | Type | Description |
---|---|---|
baseFieldIndex | int | The row or column field index in the base fields |
startVal | double | Specifies the starting value for numeric grouping. |
endVal | double | Specifies the ending value for numeric grouping. |
groupByList | java.util.ArrayList | Specifies the grouping type list. Specified by PivotTableGroupType |
intervalNum | double | Specifies 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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setName(String value)
public void setName(String value)
Gets the name of the PivotTable
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
value | int |
setPageFieldWrapCount(int value)
public void setPageFieldWrapCount(int value)
Gets the number of page fields in each column or row in the PivotTable report.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setPivotTableStyleName(String value)
public void setPivotTableStyleName(String value)
Sets the pivottable style name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setPivotTableStyleType(int value)
public void setPivotTableStyleType(int value)
Sets the built-in pivot table style.
See PivotTableStyleType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setPreserveFormatting(boolean value)
public void setPreserveFormatting(boolean value)
Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRefreshDataFlag(boolean value)
public void setRefreshDataFlag(boolean value)
Indicates whether Refreshing Data or not.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRefreshDataOnOpeningFile(boolean value)
public void setRefreshDataOnOpeningFile(boolean value)
Indicates whether Refresh Data when Opening File.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRowGrand(boolean value)
public void setRowGrand(boolean value)
Indicates whether the PivotTable report shows grand totals for rows.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRowHeaderCaption(String value)
public void setRowHeaderCaption(String value)
Gets the Row Header Caption of the PivotTable.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setSaveData(boolean value)
public void setSaveData(boolean value)
Indicates whether data for the PivotTable report is saved with the workbook.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setSelected(boolean value)
public void setSelected(boolean value)
Indicates whether this PivotTable is selected.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowDataTips(boolean value)
public void setShowDataTips(boolean value)
Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowDrill(boolean value)
public void setShowDrill(boolean value)
Sets whether showing expand/collapse buttons.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowEmptyCol(boolean value)
public void setShowEmptyCol(boolean value)
Specifies a boolean value that indicates whether to include empty columns in the table
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowEmptyRow(boolean value)
public void setShowEmptyRow(boolean value)
Specifies a boolean value that indicates whether to include empty rows in the table.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowPivotStyleColumnHeader(boolean value)
public void setShowPivotStyleColumnHeader(boolean value)
Indicates whether the column header in the pivot table should have the style applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowPivotStyleColumnStripes(boolean value)
public void setShowPivotStyleColumnStripes(boolean value)
Indicates whether stripe formatting is applied for column.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowPivotStyleLastColumn(boolean value)
public void setShowPivotStyleLastColumn(boolean value)
Indicates whether the column formatting is applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowPivotStyleRowHeader(boolean value)
public void setShowPivotStyleRowHeader(boolean value)
Indicates whether the row header in the pivot table should have the style applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowPivotStyleRowStripes(boolean value)
public void setShowPivotStyleRowStripes(boolean value)
Indicates whether row stripe formatting is applied.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowValuesRow(boolean value)
public void setShowValuesRow(boolean value)
Indicates whether showing values row.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setTag(String value)
public void setTag(String value)
Gets a string saved with the PivotTable report.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.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:
Parameter | Type | Description |
---|---|---|
pivotField | PivotField | The 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:
Parameter | Type | Description |
---|---|---|
baseFieldIndex | int | The 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:
Parameter | Type | Description |
---|---|---|
rowOffset | int | Offset to the first data row in the data region. |
columnOffset | int | Offset to the first data column in the data region. |
newSheet | boolean | Show the detail to a new worksheet. |
destRow | int | The target row. |
destColumn | int | The 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:
Parameter | Type | Description |
---|---|---|
pageField | PivotField | The 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:
Parameter | Type | Description |
---|---|---|
posIndex | int | The 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:
Parameter | Type | Description |
---|---|---|
fieldName | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |