java.lang.Object
com.aspose.cells.PivotTable
public class 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");
| Property Getters/Setters Summary | ||
|---|---|---|
java.lang.String | getAltTextDescription() | |
void | setAltTextDescription(java.lang.String) | |
| Gets the description of the alt text | ||
java.lang.String | getAltTextTitle() | |
void | setAltTextTitle(java.lang.String) | |
| Gets the title of the altertext | ||
int | getAutoFormatType() | |
void | setAutoFormatType(int) | |
| Gets the PivotTable auto format type. The value of the property is PivotTableAutoFormatType integer constant. | ||
PivotFieldCollection | getBaseFields() | |
| Returns a PivotFields object that includes all fields in the PivotTable report | ||
PivotFieldCollection | getColumnFields() | |
| Returns a PivotFields object that are currently shown as column fields. | ||
boolean | getColumnGrand() | |
void | setColumnGrand(boolean) | |
| Indicates whether the PivotTable report shows grand totals for columns. | ||
java.lang.String | getColumnHeaderCaption() | |
void | setColumnHeaderCaption(java.lang.String) | |
| Gets the Column Header Caption of the PivotTable. | ||
CellArea | getColumnRange() | |
| Returns a CellArea object that represents the range that contains the column area in the PivotTable report. Read-only. | ||
boolean | getCustomListSort() | |
void | setCustomListSort(boolean) | |
| Indicates whether consider built-in custom list when sort data | ||
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. | ||
PivotField | getDataField() | |
| 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. | ||
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. | ||
java.lang.String[] | getDataSource() | |
void | setDataSource(java.lang.String[]) | |
| Gets and sets the data source of the pivot table. | ||
boolean | getDisplayErrorString() | |
void | setDisplayErrorString(boolean) | |
| Indicates whether the PivotTable report displays a custom string in cells that contain errors. | ||
boolean | getDisplayImmediateItems() | |
void | setDisplayImmediateItems(boolean) | |
| 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. | ||
boolean | getDisplayNullString() | |
void | setDisplayNullString(boolean) | |
| Indicates whether the PivotTable report displays a custom string in cells that contain null values. | ||
boolean | getEnableDataValueEditing() | |
void | setEnableDataValueEditing(boolean) | |
| 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 | ||
boolean | getEnableDrilldown() | |
void | setEnableDrilldown(boolean) | |
| Gets whether drilldown is enabled. | ||
boolean | getEnableFieldDialog() | |
void | setEnableFieldDialog(boolean) | |
| Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field. | ||
boolean | getEnableFieldList() | |
void | setEnableFieldList(boolean) | |
| Gets whether enable the field list for the PivotTable. | ||
boolean | getEnableWizard() | |
void | setEnableWizard(boolean) | |
| Indicates whether the PivotTable Wizard is available. | ||
java.lang.String | getErrorString() | |
void | setErrorString(java.lang.String) | |
| Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string. | ||
ExternalConnection | getExternalConnectionDataSource() | |
| Gets the external connection data source. | ||
boolean | getFieldListSortAscending() | |
void | setFieldListSortAscending(boolean) | |
| Specifies a boolean value that indicates whether fields in the PivotTable are sorted in non-default order in the field list. | ||
java.lang.String | getGrandTotalName() | |
void | setGrandTotalName(java.lang.String) | |
| Returns the text string label that is displayed in the grand total column or row heading. The default value is the string "Grand Total". | ||
boolean | hasBlankRows() | |
void | setHasBlankRows(boolean) | |
| Indicates whether to add blank rows. This property only applies for the PivotTable auto format types which needs to add blank rows. | ||
int | getIndent() | |
void | setIndent(int) | |
| Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form. | ||
boolean | isAutoFormat() | |
void | setAutoFormat(boolean) | |
| Indicates whether the PivotTable report is automatically formatted. Checkbox "autoformat table " which is in pivottable option for Excel 2003 Checkbox "autofit column width on update" which is in pivot table Options :Layout Format for Excel 2007 | ||
boolean | isExcel2003Compatible() | |
void | setExcel2003Compatible(boolean) | |
| 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. | ||
boolean | isGridDropZones() | |
void | setGridDropZones(boolean) | |
| Indicates whether the PivotTable report displays classic pivottable layout. (enables dragging fields in the grid) | ||
boolean | isMultipleFieldFilters() | |
void | setMultipleFieldFilters(boolean) | |
| Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. | ||
boolean | isSelected() | |
void | setSelected(boolean) | |
| Indicates whether the PivotTable is selected. | ||
boolean | getItemPrintTitles() | |
void | setItemPrintTitles(boolean) | |
| A bit that specifies whether pivot item captions on the row axis are repeated on each printed page for pivot fields in tabular form. | ||
boolean | getManualUpdate() | |
void | setManualUpdate(boolean) | |
| Indicates whether the PivotTable report is recalculated only at the user's request. | ||
boolean | getMergeLabels() | |
void | setMergeLabels(boolean) | |
| Indicates whether the specified PivotTable report's outer-row item, column item, subtotal, and grand total labels use merged cells. | ||
int | getMissingItemsLimit() | |
void | setMissingItemsLimit(int) | |
| Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them. The value of the property is PivotMissingItemLimitType integer constant. | ||
java.lang.String | getName() | |
void | setName(java.lang.String) | |
| Gets the name of the PivotTable | ||
java.lang.String | getNullString() | |
void | setNullString(java.lang.String) | |
| Gets the string displayed in cells that contain null values when the DisplayNullString property is true.The default value is an empty string. | ||
int | getPageFieldOrder() | |
void | setPageFieldOrder(int) | |
| Gets the order in which page fields are added to the PivotTable report's layout. The value of the property is PrintOrderType integer constant. | ||
PivotFieldCollection | getPageFields() | |
| Returns a PivotFields object that are currently shown as page fields. | ||
int | getPageFieldWrapCount() | |
void | setPageFieldWrapCount(int) | |
| Gets the number of page fields in each column or row in the PivotTable report. | ||
PivotFilterCollection | getPivotFilters() | |
| Returns a PivotFilterCollection object. | ||
PivotFormatConditionCollection | getPivotFormatConditions() | |
| Gets the Format Conditions of the pivot table. | ||
java.lang.String | getPivotTableStyleName() | |
void | setPivotTableStyleName(java.lang.String) | |
| Gets and sets the pivottable style name. | ||
int | getPivotTableStyleType() | |
void | setPivotTableStyleType(int) | |
| Gets and sets the built-in pivot table style. The value of the property is PivotTableStyleType integer constant. | ||
boolean | getPreserveFormatting() | |
void | setPreserveFormatting(boolean) | |
| Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated. | ||
boolean | getPrintDrill() | |
void | setPrintDrill(boolean) | |
| Specifies a boolean value that indicates whether drill indicators should be printed. print expand/collapse buttons when displayed on pivottable. | ||
boolean | getPrintTitles() | |
void | setPrintTitles(boolean) | |
| Indicates whether the print titles for the worksheet are set based on the PivotTable report. The default value is false. | ||
boolean | getRefreshDataFlag() | |
void | setRefreshDataFlag(boolean) | |
| Indicates whether Refresh Data or not. | ||
boolean | getRefreshDataOnOpeningFile() | |
void | setRefreshDataOnOpeningFile(boolean) | |
| Indicates whether Refresh Data when Opening File. | ||
com.aspose.cells.DateTime | getRefreshDate() | |
| Gets the date when the PivotTable was last refreshed. | ||
java.lang.String | getRefreshedByWho() | |
| Gets the name of the user who last refreshed the PivotTable | ||
PivotFieldCollection | getRowFields() | |
| Returns a PivotFields object that are currently shown as row fields. | ||
boolean | getRowGrand() | |
void | setRowGrand(boolean) | |
| Indicates whether the PivotTable report shows grand totals for rows. | ||
java.lang.String | getRowHeaderCaption() | |
void | setRowHeaderCaption(java.lang.String) | |
| Gets the Row Header Caption of the PivotTable. | ||
CellArea | getRowRange() | |
| Returns a CellArea object that represents the range that contains the row area in the PivotTable report. Read-only. | ||
boolean | getSaveData() | |
void | setSaveData(boolean) | |
| Indicates whether data for the PivotTable report is saved with the workbook. | ||
boolean | getShowDataTips() | |
void | setShowDataTips(boolean) | |
| Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells. | ||
boolean | getShowDrill() | |
void | setShowDrill(boolean) | |
| Gets whether expand/collapse buttons is shown. | ||
boolean | getShowEmptyCol() | |
void | setShowEmptyCol(boolean) | |
| Specifies a boolean value that indicates whether to include empty columns in the table | ||
boolean | getShowEmptyRow() | |
void | setShowEmptyRow(boolean) | |
| Specifies a boolean value that indicates whether to include empty rows in the table. | ||
boolean | getShowMemberPropertyTips() | |
void | setShowMemberPropertyTips(boolean) | |
| Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips. | ||
boolean | getShowPivotStyleColumnHeader() | |
void | setShowPivotStyleColumnHeader(boolean) | |
| Indicates whether the column header in the pivot table should have the style applied. | ||
boolean | getShowPivotStyleColumnStripes() | |
void | setShowPivotStyleColumnStripes(boolean) | |
| Indicates whether column stripe formatting is applied. | ||
boolean | getShowPivotStyleLastColumn() | |
void | setShowPivotStyleLastColumn(boolean) | |
| Indicates whether column stripe formatting is applied. | ||
boolean | getShowPivotStyleRowHeader() | |
void | setShowPivotStyleRowHeader(boolean) | |
| Indicates whether the row header in the pivot table should have the style applied. | ||
boolean | getShowPivotStyleRowStripes() | |
void | setShowPivotStyleRowStripes(boolean) | |
| Indicates whether row stripe formatting is applied. | ||
boolean | getShowRowHeaderCaption() | |
void | setShowRowHeaderCaption(boolean) | |
| Indicates whether row header caption is shown in the PivotTable report Indicates whether Display field captions and filter drop downs | ||
boolean | getShowValuesRow() | |
void | setShowValuesRow(boolean) | |
| Specifies a boolean value that indicates whether show values row. show the values row | ||
boolean | getSubtotalHiddenPageItems() | |
void | setSubtotalHiddenPageItems(boolean) | |
| 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. | ||
CellArea | getTableRange1() | |
| Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn't include page fields. Read-only. | ||
CellArea | getTableRange2() | |
| Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields. Read-only. | ||
java.lang.String | getTag() | |
void | setTag(java.lang.String) | |
| Gets a string saved with the PivotTable report. | ||
| Method Summary | ||
|---|---|---|
void | addCalculatedField(java.lang.String name, java.lang.String formula) | |
| Adds a calculated field to pivot field and drag it to data area. | ||
void | addCalculatedField(java.lang.String name, java.lang.String formula, boolean dragToDataArea) | |
| Adds a calculated field to pivot field. | ||
int | addFieldToArea(int fieldType, PivotField pivotField) | |
| Adds the field to the specific area. | ||
int | addFieldToArea(int fieldType, int baseFieldIndex) | |
| Adds the field to the specific area. | ||
int | addFieldToArea(int fieldType, java.lang.String fieldName) | |
| Adds the field to the specific area. | ||
void | calculateData() | |
| Calculates pivottable's data to cells. | ||
void | calculateRange() | |
| Calculates pivottable's range. | ||
void | changeDataSource(java.lang.String[] source) | |
| Set pivottable's source data. Sheet1!$A$1:$C$3 | ||
void | clearData() | |
| Clear PivotTable's data and formatting | ||
void | copyStyle(PivotTable pivotTable) | |
| Copies named style from another pivot table. | ||
void | dispose() | |
| Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | ||
PivotFieldCollection | fields(int fieldType) | |
| Gets the specific fields by the field type. | ||
void | format(int row, int column, Style style) | |
| Format the cell in the pivottable area | ||
void | formatAll(Style style) | |
| Format all the cell in the pivottable area | ||
void | formatRow(int row, Style style) | |
| Format the row data in the pivottable area | ||
Cell | getCellByDisplayName(java.lang.String displayName) | |
| Gets the Cell object by the DisplayName of PivotField | ||
com.aspose.cells.PivotTable[] | getChildren() | |
| Gets the Children Pivot Tables which use this PivotTable data as data source. | ||
java.util.ArrayList | getHorizontalBreaks() | |
| get pivot table row index list of horizontal pagebreaks | ||
java.lang.String[] | getSource() | |
| Get pivottable's source data. | ||
void | move(int row, int column) | |
| Moves the PivotTable to a different location in the worksheet. | ||
void | move(java.lang.String destCellName) | |
| Moves the PivotTable to a different location in the worksheet. | ||
void | refreshData() | |
| Refreshes pivottable's data and setting from it's data source. | ||
void | removeField(int fieldType, PivotField pivotField) | |
| Remove field from specific field area | ||
void | removeField(int fieldType, int baseFieldIndex) | |
| Removes a field from specific field area | ||
void | removeField(int fieldType, java.lang.String fieldName) | |
| Removes a field from specific field area | ||
void | setAutoGroupField(PivotField pivotField) | |
| Sets auto field group by the PivotTable. | ||
void | setAutoGroupField(int baseFieldIndex) | |
| Sets auto field group by the PivotTable. | ||
void | setManualGroupField(PivotField pivotField, com.aspose.cells.DateTime startVal, com.aspose.cells.DateTime endVal, java.util.ArrayList groupByList, int intervalNum) | |
| Sets manual field group by the PivotTable. | ||
void | setManualGroupField(PivotField pivotField, double startVal, double endVal, java.util.ArrayList groupByList, double intervalNum) | |
| Sets manual field group by the PivotTable. | ||
void | setManualGroupField(int baseFieldIndex, com.aspose.cells.DateTime startVal, com.aspose.cells.DateTime endVal, java.util.ArrayList groupByList, int intervalNum) | |
| Sets manual field group by the PivotTable. | ||
void | setManualGroupField(int baseFieldIndex, double startVal, double endVal, java.util.ArrayList groupByList, double intervalNum) | |
| Sets manual field group by the PivotTable. | ||
void | setUngroup(PivotField pivotField) | |
| Sets ungroup by the PivotTable | ||
void | setUngroup(int baseFieldIndex) | |
| Sets ungroup by the PivotTable | ||
void | showInCompactForm() | |
| Layouts the PivotTable in compact form. | ||
void | showInOutlineForm() | |
| Layouts the PivotTable in outline form. | ||
void | showInTabularForm() | |
| Layouts the PivotTable in tabular form. | ||
void | showReportFilterPage(PivotField pageField) | |
| Show all the report filter pages according to PivotField, the PivotField must be located in the PageFields. | ||
void | showReportFilterPageByIndex(int posIndex) | |
| Show all the report filter pages according to the position index in the PageFields | ||
void | showReportFilterPageByName(java.lang.String fieldName) | |
| Show all the report filter pages according to PivotField's name, the PivotField must be located in the PageFields. | ||
| Property Getters/Setters Detail |
|---|
isExcel2003Compatible/setExcel2003Compatible | |
public boolean isExcel2003Compatible() / public void setExcel2003Compatible(boolean value) | |
getRefreshedByWho | |
public java.lang.String getRefreshedByWho() | |
getRefreshDate | |
public com.aspose.cells.DateTime getRefreshDate() | |
getPivotTableStyleName/setPivotTableStyleName | |
public java.lang.String getPivotTableStyleName() / public void setPivotTableStyleName(java.lang.String value) | |
getPivotTableStyleType/setPivotTableStyleType | |
public int getPivotTableStyleType() / public void setPivotTableStyleType(int value) | |
getColumnFields | |
public PivotFieldCollection getColumnFields() | |
getRowFields | |
public PivotFieldCollection getRowFields() | |
getPageFields | |
public PivotFieldCollection getPageFields() | |
getDataFields | |
public PivotFieldCollection getDataFields() | |
getDataField | |
public PivotField getDataField() | |
getBaseFields | |
public PivotFieldCollection getBaseFields() | |
getPivotFilters | |
public PivotFilterCollection getPivotFilters() | |
getColumnRange | |
public CellArea getColumnRange() | |
getRowRange | |
public CellArea getRowRange() | |
getDataBodyRange | |
public CellArea getDataBodyRange() | |
getTableRange1 | |
public CellArea getTableRange1() | |
getTableRange2 | |
public CellArea getTableRange2() | |
getColumnGrand/setColumnGrand | |
public boolean getColumnGrand() / public void setColumnGrand(boolean value) | |
isGridDropZones/setGridDropZones | |
public boolean isGridDropZones() / public void setGridDropZones(boolean value) | |
getRowGrand/setRowGrand | |
public boolean getRowGrand() / public void setRowGrand(boolean value) | |
getDisplayNullString/setDisplayNullString | |
public boolean getDisplayNullString() / public void setDisplayNullString(boolean value) | |
getNullString/setNullString | |
public java.lang.String getNullString() / public void setNullString(java.lang.String value) | |
getDisplayErrorString/setDisplayErrorString | |
public boolean getDisplayErrorString() / public void setDisplayErrorString(boolean value) | |
getErrorString/setErrorString | |
public java.lang.String getErrorString() / public void setErrorString(java.lang.String value) | |
isAutoFormat/setAutoFormat | |
public boolean isAutoFormat() / public void setAutoFormat(boolean value) | |
getAutoFormatType/setAutoFormatType | |
public int getAutoFormatType() / public void setAutoFormatType(int value) | |
hasBlankRows/setHasBlankRows | |
public boolean hasBlankRows() / public void setHasBlankRows(boolean value) | |
getMergeLabels/setMergeLabels | |
public boolean getMergeLabels() / public void setMergeLabels(boolean value) | |
getPreserveFormatting/setPreserveFormatting | |
public boolean getPreserveFormatting() / public void setPreserveFormatting(boolean value) | |
getShowDrill/setShowDrill | |
public boolean getShowDrill() / public void setShowDrill(boolean value) | |
getEnableDrilldown/setEnableDrilldown | |
public boolean getEnableDrilldown() / public void setEnableDrilldown(boolean value) | |
getEnableFieldDialog/setEnableFieldDialog | |
public boolean getEnableFieldDialog() / public void setEnableFieldDialog(boolean value) | |
getEnableFieldList/setEnableFieldList | |
public boolean getEnableFieldList() / public void setEnableFieldList(boolean value) | |
getEnableWizard/setEnableWizard | |
public boolean getEnableWizard() / public void setEnableWizard(boolean value) | |
getSubtotalHiddenPageItems/setSubtotalHiddenPageItems | |
public boolean getSubtotalHiddenPageItems() / public void setSubtotalHiddenPageItems(boolean value) | |
getGrandTotalName/setGrandTotalName | |
public java.lang.String getGrandTotalName() / public void setGrandTotalName(java.lang.String value) | |
getManualUpdate/setManualUpdate | |
public boolean getManualUpdate() / public void setManualUpdate(boolean value) | |
isMultipleFieldFilters/setMultipleFieldFilters | |
public boolean isMultipleFieldFilters() / public void setMultipleFieldFilters(boolean value) | |
getMissingItemsLimit/setMissingItemsLimit | |
public int getMissingItemsLimit() / public void setMissingItemsLimit(int value) | |
getEnableDataValueEditing/setEnableDataValueEditing | |
public boolean getEnableDataValueEditing() / public void setEnableDataValueEditing(boolean value) | |
getShowDataTips/setShowDataTips | |
public boolean getShowDataTips() / public void setShowDataTips(boolean value) | |
getShowMemberPropertyTips/setShowMemberPropertyTips | |
public boolean getShowMemberPropertyTips() / public void setShowMemberPropertyTips(boolean value) | |
getShowValuesRow/setShowValuesRow | |
public boolean getShowValuesRow() / public void setShowValuesRow(boolean value) | |
getShowEmptyCol/setShowEmptyCol | |
public boolean getShowEmptyCol() / public void setShowEmptyCol(boolean value) | |
getShowEmptyRow/setShowEmptyRow | |
public boolean getShowEmptyRow() / public void setShowEmptyRow(boolean value) | |
getFieldListSortAscending/setFieldListSortAscending | |
public boolean getFieldListSortAscending() / public void setFieldListSortAscending(boolean value) | |
getPrintDrill/setPrintDrill | |
public boolean getPrintDrill() / public void setPrintDrill(boolean value) | |
getAltTextTitle/setAltTextTitle | |
public java.lang.String getAltTextTitle() / public void setAltTextTitle(java.lang.String value) | |
getAltTextDescription/setAltTextDescription | |
public java.lang.String getAltTextDescription() / public void setAltTextDescription(java.lang.String value) | |
getName/setName | |
public java.lang.String getName() / public void setName(java.lang.String value) | |
getColumnHeaderCaption/setColumnHeaderCaption | |
public java.lang.String getColumnHeaderCaption() / public void setColumnHeaderCaption(java.lang.String value) | |
getIndent/setIndent | |
public int getIndent() / public void setIndent(int value) | |
getRowHeaderCaption/setRowHeaderCaption | |
public java.lang.String getRowHeaderCaption() / public void setRowHeaderCaption(java.lang.String value) | |
getShowRowHeaderCaption/setShowRowHeaderCaption | |
public boolean getShowRowHeaderCaption() / public void setShowRowHeaderCaption(boolean value) | |
getCustomListSort/setCustomListSort | |
public boolean getCustomListSort() / public void setCustomListSort(boolean value) | |
getPivotFormatConditions | |
public PivotFormatConditionCollection getPivotFormatConditions() | |
getPageFieldOrder/setPageFieldOrder | |
public int getPageFieldOrder() / public void setPageFieldOrder(int value) | |
getPageFieldWrapCount/setPageFieldWrapCount | |
public int getPageFieldWrapCount() / public void setPageFieldWrapCount(int value) | |
getTag/setTag | |
public java.lang.String getTag() / public void setTag(java.lang.String value) | |
getSaveData/setSaveData | |
public boolean getSaveData() / public void setSaveData(boolean value) | |
getRefreshDataOnOpeningFile/setRefreshDataOnOpeningFile | |
public boolean getRefreshDataOnOpeningFile() / public void setRefreshDataOnOpeningFile(boolean value) | |
getRefreshDataFlag/setRefreshDataFlag | |
public boolean getRefreshDataFlag() / public void setRefreshDataFlag(boolean value) | |
getExternalConnectionDataSource | |
public ExternalConnection getExternalConnectionDataSource() | |
getDataSource/setDataSource | |
public java.lang.String[] getDataSource() / public void setDataSource(java.lang.String[] value) | |
getItemPrintTitles/setItemPrintTitles | |
public boolean getItemPrintTitles() / public void setItemPrintTitles(boolean value) | |
getPrintTitles/setPrintTitles | |
public boolean getPrintTitles() / public void setPrintTitles(boolean value) | |
getDisplayImmediateItems/setDisplayImmediateItems | |
public boolean getDisplayImmediateItems() / public void setDisplayImmediateItems(boolean value) | |
isSelected/setSelected | |
public boolean isSelected() / public void setSelected(boolean value) | |
getShowPivotStyleRowHeader/setShowPivotStyleRowHeader | |
public boolean getShowPivotStyleRowHeader() / public void setShowPivotStyleRowHeader(boolean value) | |
getShowPivotStyleColumnHeader/setShowPivotStyleColumnHeader | |
public boolean getShowPivotStyleColumnHeader() / public void setShowPivotStyleColumnHeader(boolean value) | |
getShowPivotStyleRowStripes/setShowPivotStyleRowStripes | |
public boolean getShowPivotStyleRowStripes() / public void setShowPivotStyleRowStripes(boolean value) | |
getShowPivotStyleColumnStripes/setShowPivotStyleColumnStripes | |
public boolean getShowPivotStyleColumnStripes() / public void setShowPivotStyleColumnStripes(boolean value) | |
getShowPivotStyleLastColumn/setShowPivotStyleLastColumn | |
public boolean getShowPivotStyleLastColumn() / public void setShowPivotStyleLastColumn(boolean value) | |
| Method Detail |
|---|
changeDataSource | |
public void changeDataSource(java.lang.String[] source) | |
getSource | |
public java.lang.String[] getSource() | |
refreshData | |
public void refreshData() | |
calculateData | |
public void calculateData()
throws java.lang.Exception | |
clearData | |
public void clearData() | |
calculateRange | |
public void calculateRange() | |
formatAll | |
public void formatAll(Style style) | |
style - Style which is to formatformatRow | |
public void formatRow(int row, Style style) | |
row - Row Index of the Row objectstyle - Style which is to formatformat | |
public void format(int row, int column, Style style) | |
row - Row Index of the cellcolumn - Column index of the cellstyle - Style which is to format the cellsetAutoGroupField | |
public void setAutoGroupField(int baseFieldIndex) | |
baseFieldIndex - The row or column field index in the base fieldssetAutoGroupField | |
public void setAutoGroupField(PivotField pivotField) | |
pivotField - The row or column field in the specific fieldssetManualGroupField | |
public void setManualGroupField(int baseFieldIndex, double startVal, double endVal, java.util.ArrayList groupByList, double intervalNum) | |
baseFieldIndex - The row or column field index in the base fieldsstartVal - Specifies the starting value for numeric grouping.endVal - Specifies the ending value for numeric grouping. groupByList - Specifies the grouping type list. Specified by PivotTableGroupTypeintervalNum - Specifies the interval number group by numeric grouping.setManualGroupField | |
public void setManualGroupField(PivotField pivotField, double startVal, double endVal, java.util.ArrayList groupByList, double intervalNum) | |
pivotField - The row or column field in the base fieldsstartVal - Specifies the starting value for numeric grouping.endVal - Specifies the ending value for numeric grouping. groupByList - Specifies the grouping type list. Specified by PivotTableGroupTypeintervalNum - Specifies the interval number group by numeric grouping.setManualGroupField | |
public void setManualGroupField(int baseFieldIndex, com.aspose.cells.DateTime startVal, com.aspose.cells.DateTime endVal, java.util.ArrayList groupByList, int intervalNum) | |
baseFieldIndex - The row or column field index in the base fieldsstartVal - Specifies the starting value for date grouping. endVal - Specifies the ending value for date grouping.groupByList - Specifies the grouping type list. Specified by PivotTableGroupTypeintervalNum - Specifies the interval number group by in days grouping.The number of days must be positive integer of nonzerosetManualGroupField | |
public void setManualGroupField(PivotField pivotField, com.aspose.cells.DateTime startVal, com.aspose.cells.DateTime endVal, java.util.ArrayList groupByList, int intervalNum) | |
pivotField - The row or column field in the base fieldsstartVal - Specifies the starting value for date grouping.endVal - Specifies the ending value for date grouping.groupByList - Specifies the grouping type list. Specified by PivotTableGroupTypeintervalNum - Specifies the interval number group by in days grouping.The number of days must be positive integer of nonzerosetUngroup | |
public void setUngroup(int baseFieldIndex) | |
baseFieldIndex - The row or column field index in the base fieldssetUngroup | |
public void setUngroup(PivotField pivotField) | |
pivotField - The row or column field in the base fieldsgetHorizontalBreaks | |
public java.util.ArrayList getHorizontalBreaks() | |
showInCompactForm | |
public void showInCompactForm() | |
showInOutlineForm | |
public void showInOutlineForm() | |
showInTabularForm | |
public void showInTabularForm() | |
getCellByDisplayName | |
public Cell getCellByDisplayName(java.lang.String displayName) | |
displayName - the DisplayName of PivotFieldgetChildren | |
public com.aspose.cells.PivotTable[] getChildren() | |
dispose | |
public void dispose() | |
copyStyle | |
public void copyStyle(PivotTable pivotTable) | |
pivotTable - Source pivot table.showReportFilterPage | |
public void showReportFilterPage(PivotField pageField) throws java.lang.Exception | |
pageField - The PivotField objectshowReportFilterPageByName | |
public void showReportFilterPageByName(java.lang.String fieldName)
throws java.lang.Exception | |
fieldName - The name of PivotFieldshowReportFilterPageByIndex | |
public void showReportFilterPageByIndex(int posIndex)
throws java.lang.Exception | |
posIndex - The position index in the PageFieldsremoveField | |
public void removeField(int fieldType, java.lang.String fieldName) | |
fieldType - A fieldName - The name in the base fields.removeField | |
public void removeField(int fieldType, int baseFieldIndex) | |
fieldType - A baseFieldIndex - The field index in the base fields.removeField | |
public void removeField(int fieldType, PivotField pivotField) | |
fieldType - A pivotField - the field in the base fields.addFieldToArea | |
public int addFieldToArea(int fieldType, java.lang.String fieldName) | |
fieldType - A fieldName - The name in the base fields.addFieldToArea | |
public int addFieldToArea(int fieldType, int baseFieldIndex) | |
fieldType - A baseFieldIndex - The field index in the base fields.addFieldToArea | |
public int addFieldToArea(int fieldType, PivotField pivotField) | |
fieldType - A pivotField - the field in the base fields.addCalculatedField | |
public void addCalculatedField(java.lang.String name, java.lang.String formula, boolean dragToDataArea) | |
name - The name of the calculated fieldformula - The formula of the calculated field.dragToDataArea - True,drag this field to data area immediatelyaddCalculatedField | |
public void addCalculatedField(java.lang.String name, java.lang.String formula) | |
name - The name of the calculated fieldformula - The formula of the calculated field.fields | |
public PivotFieldCollection fields(int fieldType) | |
fieldType - A move | |
public void move(int row, int column) | |
row - row index.column - column index.move | |
public void move(java.lang.String destCellName) | |
destCellName - the dest cell name.