![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.cells.PivotTable
public class PivotTable
Represents a PivotTable report on a worksheet.
Method Summary | |
---|---|
void |
addCalculatedField(java.lang.String name,
java.lang.String formula,
boolean dragToDataArea)
Adds a calclulated field to pivot field. |
int |
addFieldToArea(byte fieldType,
int baseFieldIndex)
Adds the field to the specific area. |
int |
addFieldToArea(byte fieldType,
PivotField pivotField)
Adds the field to the specific area. |
boolean |
displayErrorString()
Indicates whether the PivotTable report displays a custom string in cells that contain errors. |
boolean |
displayImmediateItems()
Indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. |
boolean |
displayNullString()
Indicates whether the PivotTable report displays a custom string in cells that contain null values. |
boolean |
enableDrilldown()
Gets whether drilldown is enabled. |
boolean |
enableFieldDialog()
Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field. |
boolean |
enableFieldList()
Gets whether enable to display the field list for the PivotTable. |
boolean |
enableWizard()
Indicates whether the PivotTable Wizard is available. |
short |
getAutoFormatType()
Gets the PivotTable atuo format type. |
PivotFields |
getBaseFields()
Returns a PivotFields object that includes all fields in the PivotTable report. |
PivotFields |
getColumnFields()
Returns a PivotFields object that are currently shown as column fields. |
CellArea |
getColumnRange()
Returns a CellArea object that represents the range that contains the column area in the PivotTable report. |
CellArea |
getDataBordyRange()
Returns a CellArea object that represents the range that contains the data area in the list between the header row and the insert row. |
PivotField |
getDataField()
Gets a PivotField object that represents all the data fields in a PivotTable. |
PivotFields |
getDataFields()
Returns a PivotFields object that are currently shown as data fields. |
java.lang.String |
getErrorString()
Gets the string displayed in cells that contain errors when the DisplayErrorString property is true.The default value is an empty string. |
PivotFields |
getFields(byte fieldType)
Gets the specific fields by the field type. |
java.lang.String |
getName()
Gets the name of the PivotTable |
java.lang.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. |
byte |
getPageFieldOrder()
Gets the order in which page fields are added to the PivotTable report's layout. |
PivotFields |
getPageFields()
Returns a PivotFields object that are currently shown as page fields. |
int |
getPageFieldWrapCount()
Gets the number of page fields in each column or row in the PivotTable report. |
PivotFields |
getRowFields()
Returns a PivotFields object that are currently shown as row fields. |
CellArea |
getRowRange()
Returns a CellArea object that represents the range that contains the row area in the PivotTable report. |
CellArea |
getTableRange1()
Returns a CellArea object that represents the range containing the entire PivotTable report, but doesn't include page fields. |
CellArea |
getTableRange2()
Returns a CellArea object that represents the range containing the entire PivotTable report, includes page fields. |
java.lang.String |
getTag()
Gets a string saved with the PivotTable report. |
boolean |
isAutoFormat()
Indicates whether the PivotTable report is automatically formatted. |
boolean |
isColumnGrand()
Indicates whether the PivotTable report shows grand totals for columns. |
boolean |
isRowGrand()
Indicates whether the PivotTable report shows grand totals for rows. |
boolean |
isSelected()
Indicates whether the PivotTable is selected. |
boolean |
manualUpdate()
Indicates whether the PivotTable report is recalculated only at the user's request. |
boolean |
mergeLabels()
Indicates whether the specified PivotTable report's outer-row item, column item, subtotal, and grand total labels use merged cells. |
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. |
boolean |
preserveFormatting()
Indicates whether formatting is preserved when the PivotTable is refreshed or recalculated. |
boolean |
printTitles()
Indicates whether the print titles for the worksheet are set based on the PivotTable report. |
boolean |
saveData()
Indicates whether data for the PivotTable report is saved with the workbook. |
void |
setAutoFormat(boolean isAutoFormat)
Sets whether the PivotTable report is automatically formatted. |
void |
setAutoFormatType(short autoFormatType)
Sets the PivotTable atuo format type.Only effect when isAutoFormat is true. |
void |
setAutoGroupField(int baseFieldIndex)
Sets auto field group by the PivotTable. |
void |
setAutoGroupField(PivotField pivotField)
Sets auto field group by the PivotTable. |
void |
setColumnGrand(boolean isColumnGrand)
Sets whether the PivotTable report shows grand totals for columns. |
void |
setDisplayErrorString(boolean displayErrorString)
Sets whether the PivotTable report displays a custom string in cells that contain errors. |
void |
setDisplayImmediateItems(boolean displayImmediateItems)
Sets indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. |
void |
setDisplayNullString(boolean displayNullString)
Sets whether the PivotTable report displays a custom string in cells that contain null values. |
void |
setEnableDrilldown(boolean enableDrilldown)
Sets whether drilldown is enabled. |
void |
setEnableFieldDialog(boolean enableFieldDialog)
Indicates whether the PivotTable Field dialog box is available when the user double-clicks the PivotTable field. |
void |
setEnableFieldList(boolean enableFieldList)
Sets whether enable to display the field list for the PivotTable. |
void |
setEnableWizard(boolean enableWizard)
Sets whether the PivotTable Wizard is available. |
void |
setErrorString(java.lang.String errorString)
Returns or sets the string displayed in cells that contain errors. |
void |
setManualGroupField(int baseFieldIndex,
java.lang.Object startVal,
java.lang.Object endVal,
java.util.ArrayList<java.lang.Byte> groupByList,
java.lang.Number intervalNum)
Sets manual field group by the PivotTable. |
void |
setManualGroupField(PivotField pivotField,
java.lang.Object startVal,
java.lang.Object endVal,
java.util.ArrayList<java.lang.Byte> groupByList,
java.lang.Number intervalNum)
Sets manual field group by the PivotTable. |
void |
setManualUpdate(boolean manualUpdate)
Sets whether the PivotTable report is recalculated only at the user's request. |
void |
setMergeLabels(boolean mergeLabels)
Sets whether the specified PivotTable report's outer-row item, column item, subtotal, and grand total labels use merged cells. |
void |
setName(java.lang.String name)
Sets the name of the PivotTable. |
void |
setNullString(java.lang.String nullString)
Returns or sets the string displayed in cells that contain null values when the DisplayNullString property is true. |
void |
setPageFieldOrder(byte pageFieldOrder)
Sets the order in which page fields are added to the PivotTable report's layout. |
void |
setPageFieldWrapCount(int pageFieldWrapCount)
Sets the number of page fields in each column or row in the PivotTable report. |
void |
setPreserveFormatting(boolean preserveFormatting)
Sets whether formatting is preserved when the PivotTable is refreshed or recalculated. |
void |
setPrintTitles(boolean printTitles)
Sets whether the print titles for the worksheet are set based on the PivotTable report. |
void |
setRowGrand(boolean isRowGrand)
Sets whether the PivotTable report shows grand totals for rows. |
void |
setSaveData(boolean saveData)
Sets whether data for the PivotTable report is saved with the workbook. |
void |
setSelected(boolean isSelected)
Sets whether the PivotTable is selected.Default is false. |
void |
setSubtotalHiddenPageItems(boolean subtotalHiddenPageItems)
Sets whether hidden page field items in the PivotTable report; |
void |
setTag(java.lang.String tag)
Sets a string saved with the PivotTable report. |
void |
setUngroup(int baseFieldIndex)
Sets ungroup by the PivotTable. |
void |
setUngroup(PivotField pivotField)
Sets ungroup by the PivotTable. |
boolean |
subtotalHiddenPageItems()
Indicates whether hidden page field items in the PivotTable report are included in row and column subtotals, block totals, and grand totals. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int addFieldToArea(byte fieldType, int baseFieldIndex)
fieldType
- the fields area type.baseFieldIndex
- the field index in the base fields.
addFieldToArea(byte, PivotField)
public int addFieldToArea(byte fieldType, PivotField pivotField)
fieldType
- the fields area type.It could be one of the following
values: PivotFieldType.ROW |
PivotFieldType.COLUMN |
PivotFieldType.DATA |
PivotFieldType.PAGE |
pivotField
- the field in the base fields.
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
- drag this field to data area immediately if true.public PivotFields getFields(byte fieldType)
fieldType
- the field type.
addFieldToArea(byte, PivotField)
public PivotFields getColumnFields()
public PivotFields getRowFields()
public PivotFields getPageFields()
public PivotFields getDataFields()
public PivotFields getBaseFields()
public CellArea getColumnRange()
public CellArea getRowRange()
public CellArea getDataBordyRange()
public PivotField getDataField()
public CellArea getTableRange1()
public CellArea getTableRange2()
public void move(int row, int column)
row
- row index.column
- column index.
java.lang.IllegalArgumentException
- if one of the indexes is out of range.public void move(java.lang.String destCellName)
destCellName
- the dest cell name.
java.lang.IllegalArgumentException
- if the cell name is invalid.public boolean isColumnGrand()
public void setColumnGrand(boolean isColumnGrand)
isColumnGrand
- whether the PivotTable report shows grand totals for columns.public boolean isRowGrand()
public void setRowGrand(boolean isRowGrand)
isRowGrand
- whether the PivotTable report shows grand totals for rows.public boolean displayNullString()
public void setDisplayNullString(boolean displayNullString)
displayNullString
- whether displays a custom string in cells that contain null values.public java.lang.String getNullString()
public void setNullString(java.lang.String nullString)
nullString
- the string displayed in cells that contain null values.public boolean displayErrorString()
public void setDisplayErrorString(boolean displayErrorString)
displayErrorString
- whether displays a custom string in cells that contain errors.public java.lang.String getErrorString()
public void setErrorString(java.lang.String errorString)
errorString
- the string displayed in cells that contain errors.public boolean isAutoFormat()
public void setAutoFormat(boolean isAutoFormat)
isAutoFormat
- whether the PivotTable report is automatically formatted.public short getAutoFormatType()
PivotTableAutoFormatType
public void setAutoFormatType(short autoFormatType)
autoFormatType
- the PivotTable atuo format type.PivotTableAutoFormatType
public boolean mergeLabels()
public void setMergeLabels(boolean mergeLabels)
mergeLabels
- whether the specified PivotTable report's item labels use merged cells.public boolean preserveFormatting()
public void setPreserveFormatting(boolean preserveFormatting)
preserveFormatting
- whether formatting is preserved when the PivotTable is refreshed or recalculated.public boolean enableDrilldown()
public void setEnableDrilldown(boolean enableDrilldown)
enableDrilldown
- whether drilldown is enabled.public boolean enableFieldDialog()
public void setEnableFieldDialog(boolean enableFieldDialog)
enableFieldDialog
- whether the PivotTable Field dialog box is available.public boolean enableFieldList()
public void setEnableFieldList(boolean enableFieldList)
enableFieldList
- whether enable to display the field list for the PivotTable.public boolean enableWizard()
public void setEnableWizard(boolean enableWizard)
enableWizard
- whether the PivotTable Wizard is available.public boolean subtotalHiddenPageItems()
public void setSubtotalHiddenPageItems(boolean subtotalHiddenPageItems)
subtotalHiddenPageItems
- whether hidden page field itemspublic boolean manualUpdate()
public void setManualUpdate(boolean manualUpdate)
manualUpdate
- whether the PivotTable report is recalculated only at the user's request.public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the PivotTable.public byte getPageFieldOrder()
setPageFieldOrder(byte)
public void setPageFieldOrder(byte pageFieldOrder)
pageFieldOrder
- the order in which page fields are added to the PivotTable report's layout.
It could be one of the following values:
OrderType.DOWN_THEN_OVER |
OrderType.OVER_THEN_DOWN |
java.lang.IllegalArgumentException
- if page field order type is not valid.public int getPageFieldWrapCount()
public void setPageFieldWrapCount(int pageFieldWrapCount)
pageFieldWrapCount
- the number of page fields in each column or row in the PivotTable report.public java.lang.String getTag()
public void setTag(java.lang.String tag)
tag
- a string saved with the PivotTable report.public boolean saveData()
public void setSaveData(boolean saveData)
saveData
- whether data for the PivotTable report is saved with the workbook.public boolean printTitles()
public void setPrintTitles(boolean printTitles)
printTitles
- whether the print titles for the worksheet are set based
on the PivotTable report.public boolean displayImmediateItems()
public void setDisplayImmediateItems(boolean displayImmediateItems)
displayImmediateItems
- whether items in the row and column areas are visible
when the data area of the PivotTable is empty.public boolean isSelected()
public void setSelected(boolean isSelected)
isSelected
- whether the PivotTable is selected.public void setAutoGroupField(int baseFieldIndex) throws java.lang.Exception
baseFieldIndex
- The row or column field index in the base fields.
java.lang.Exception
- Throws IllegalArgumentException.public void setAutoGroupField(PivotField pivotField) throws java.lang.Exception
pivotField
- The row or column field in the specific fields.
java.lang.Exception
- Throws IllegalArgumentException.public void setManualGroupField(int baseFieldIndex, java.lang.Object startVal, java.lang.Object endVal, java.util.ArrayList<java.lang.Byte> groupByList, java.lang.Number intervalNum) throws java.lang.Exception
baseFieldIndex
- The row or column field index in the base fields.startVal
- Specifies the starting value for date or numeric grouping.
Object type must be Date or Number.endVal
- Specifies the ending value for date or numeric grouping.
Object type must be Date or Number.groupByList
- Specifies the grouping type list. Specified by PivotTableGroupType.intervalNum
- Specifies the interval number group by in days or numeric grouping.
The number of days must be positive integer of nonzero.
java.lang.Exception
- Throws IllegalArgumentException or ParseException.public void setManualGroupField(PivotField pivotField, java.lang.Object startVal, java.lang.Object endVal, java.util.ArrayList<java.lang.Byte> groupByList, java.lang.Number intervalNum) throws java.lang.Exception
pivotField
- The row or column field in the specific fields.startVal
- Specifies the starting value for date or numeric grouping.
Object type must be Date or Number.endVal
- Specifies the ending value for date or numeric grouping.
Object type must be Date or Number.groupByList
- Specifies the grouping type list. Specified by PivotTableGroupType.intervalNum
- Specifies the interval number group by in days or numeric grouping.
The number of days must be positive integer of nonzero.
java.lang.Exception
- Throws IllegalArgumentException or ParseException.public void setUngroup(int baseFieldIndex)
baseFieldIndex
- The row or column field index in the base fields.
java.lang.Exception
- Throws IllegalArgumentException.public void setUngroup(PivotField pivotField)
pivotField
- The row or column field in the specific fields.
java.lang.Exception
- Throws IllegalArgumentException.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |