Package com.grapecity.documents.excel
Interface IPivotTable
public interface IPivotTable
Represents a PivotTable report on a worksheet. The PivotTable object is a member of the PivotTables collection. The PivotTables collection contains all the PivotTable objects on a single worksheet.
-
Method Summary
Modifier and TypeMethodDescriptionaddDataField(IPivotField field, String caption, ConsolidationFunction function) Adds a data field to a PivotTable report.voidDeletes all filters currently applied to the PivotTable.voidClears a PivotTable.booleanGets a value that indicates whether a PivotField can have multiple filters applied to it at the same time.Returns a CalculatedFields collection that represents all the calculated fields in the specified PivotTable report.Returns an object that represents a collection of all the fields that are currently shown as column fields.booleanGets whether the PivotTable report shows grand totals for columns.Returns a Range object that represents the range that contains the column area in the PivotTable report.intReturns the indent increment for PivotItems when compact row layout form is turned on.Returns a Range object that represents the range that contains the data area in the list between the header row and the insert row.Returns an object that represents a collection of all the fields that are currently shown as data fields.booleanReturns whether the pivotTable defer layout update.booleanGets whether tooltips are displayed for PivotTable cells.booleanGets if the PivotTable report displays a custom error string in cells that contain errors.booleanGets whether to display member properties in tooltips.booleanGets if the PivotTable report displays a custom string in cells that contain null values.Returns the string displayed in cells that contain errors when the PivotTable.getDisplayErrorString() is True.Gets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report.booleanGets a value indicating whether the PivotTable report automatically adjusts column width when refreshed.Gets the default layout settings for PivotFields when they are added to the PivotTable for the first time.booleanGets if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells.getName()Gets the name of the object.Returns the string displayed in cells that contain null values when the PivotTable.DisplayNullString property is True.Returns the order in which page fields are added to the PivotTable report’s layout.Returns an object that represents a collection of all the fields that are currently showing as page fields.intReturns the number of page fields in each column or row in the PivotTable report.Returns a Range object that represents the range that contains the page area in the PivotTable report.Returns a PivotCache object that represents the cache for the specified PivotTable report.Returns a PivotAxis object representing the entire column axis.Returns an object that represents either a single PivotTable field (a PivotField object) or a collection of both the visible and hidden fields (a PivotFields object) in the PivotTable report.Gets a PivotFormulas object that represents the collection of formulas for the specified PivotTable report.Returns a PivotAxis object representing the entire row axis.Returns an object that represents either a collection of all the fields that are currently showing as row fields.booleanGets whether the PivotTable report shows grand totals for rows.Returns a Range object that represents the range including the row area on the PivotTable report.booleanGets the boolean value if the column headers should be displayed in the PivotTable.booleanGets the boolean value displays banded columns in which even columns are formatted differently from odd columns.booleanGets the boolean value if displays grand total columns style.booleanGets the boolean value if the row headers should be displayed in the PivotTable.booleanGets the boolean value displays banded rows in which even rows are formatted differently from odd rows.getStyle()Gets the style currently applied to the specified pivot table.Returns a Range object that represents the range containing the entire PivotTable report, but doesn’t include page fields.Returns a Range object that represents the range containing the entire PivotTable report, including page fields.Gets the style used in the body of the PivotTable report.getTag()Gets a string saved with the PivotTable report.pivotValueCell(int rowline, int columnline) Retrieve the PivotValueCell object for a given PivotTable provided certain row and column indices.booleanrefresh()Refreshes the PivotTable report from the source data.voidSets whether to repeat item labels for all PivotFields in the specified PivotTable.voidsetAllowMultipleFilters(boolean allowMultipleFilters) Sets a value that indicates whether a PivotField can have multiple filters applied to it at the same time.voidsetColumnGrand(boolean value) Sets whether the PivotTable report shows grand totals for columns.voidsetCompactRowIndent(int value) Sets the indent increment for PivotItems when compact row layout form is turned on.voidsetDeferLayoutUpdate(boolean value) Sets whether the pivotTable defer layout update.voidsetDisplayContextTooltips(boolean value) Sets whether tooltips are displayed for PivotTable cells.voidsetDisplayErrorString(boolean value) Sets if the PivotTable report displays a custom error string in cells that contain errors.voidsetDisplayMemberPropertyTooltips(boolean value) Sets whether to display member properties in tooltips.voidsetDisplayNullString(boolean value) Sets if the PivotTable report displays a custom string in cells that contain null values.voidsetErrorString(String value) Sets the string displayed in cells that contain errors when the PivotTable.getDisplayErrorString() is True.voidsetGrandTotalName(String value) Sets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report.voidsetHasAutoFormat(boolean value) Sets a value indicating whether the PivotTable report automatically adjusts column width when refreshed.voidsetLayoutRowDefault(LayoutRowType value) Sets the default layout settings for PivotFields when they are added to the PivotTable for the first time.voidsetMergeLabels(boolean value) Sets if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells.voidSets the name of the object.voidsetNullString(String value) Sets the string displayed in cells that contain null values when the PivotTable.DisplayNullString property is True.voidsetPageFieldOrder(Order value) Sets the order in which page fields are added to the PivotTable report’s layout.voidsetPageFieldWrapCount(int value) Sets the number of page fields in each column or row in the PivotTable report.voidsetRowAxisLayout(LayoutRowType rowLayout) This method is used for simultaneously setting layout options for all existing PivotFields.voidsetRowGrand(boolean value) Sets whether the PivotTable report shows grand totals for rows.voidsetShowTableStyleColumnHeaders(boolean value) Sets if the column headers should be displayed in the PivotTable.voidsetShowTableStyleColumnStripes(boolean value) Sets the boolean value displays banded columns in which even columns are formatted differently from odd columns.voidsetShowTableStyleLastColumn(boolean value) Sets the boolean value if displays grand total columns style.voidsetShowTableStyleRowHeaders(boolean value) Sets the boolean value if the row headers should be displayed in the PivotTable.voidsetShowTableStyleRowStripes(boolean value) Sets the boolean value displays banded rows in which even rows are formatted differently from odd rows.voidsetStyle(ITableStyle style) Sets the style currently applied to the specified pivot table.voidsetTableStyle(String value) Sets the style used in the body of the PivotTable report.voidSets a string saved with the PivotTable report.voidsubtotalLocation(SubtotalLocationType location) Changes the subtotal location for all existing PivotFields.voidupdate()Updates the link or PivotTable report.
-
Method Details
-
getColumnGrand
boolean getColumnGrand()Gets whether the PivotTable report shows grand totals for columns. -
setColumnGrand
void setColumnGrand(boolean value) Sets whether the PivotTable report shows grand totals for columns. -
getColumnFields
IPivotFields getColumnFields()Returns an object that represents a collection of all the fields that are currently shown as column fields. Read-only. -
getColumnRange
IRange getColumnRange()Returns a Range object that represents the range that contains the column area in the PivotTable report. -
getCompactRowIndent
int getCompactRowIndent()Returns the indent increment for PivotItems when compact row layout form is turned on. -
setCompactRowIndent
void setCompactRowIndent(int value) Sets the indent increment for PivotItems when compact row layout form is turned on. -
getDataBodyRange
IRange getDataBodyRange()Returns a Range object that represents the range that contains the data area in the list between the header row and the insert row. -
getDataFields
IPivotFields getDataFields()Returns an object that represents a collection of all the fields that are currently shown as data fields. Read-only. -
getDeferLayoutUpdate
boolean getDeferLayoutUpdate()Returns whether the pivotTable defer layout update. -
setDeferLayoutUpdate
void setDeferLayoutUpdate(boolean value) Sets whether the pivotTable defer layout update. -
getDisplayContextTooltips
boolean getDisplayContextTooltips()Gets whether tooltips are displayed for PivotTable cells. -
setDisplayContextTooltips
void setDisplayContextTooltips(boolean value) Sets whether tooltips are displayed for PivotTable cells. -
getDisplayErrorString
boolean getDisplayErrorString()Gets if the PivotTable report displays a custom error string in cells that contain errors. The default value is False. -
setDisplayErrorString
void setDisplayErrorString(boolean value) Sets if the PivotTable report displays a custom error string in cells that contain errors. -
getDisplayMemberPropertyTooltips
boolean getDisplayMemberPropertyTooltips()Gets whether to display member properties in tooltips. -
setDisplayMemberPropertyTooltips
void setDisplayMemberPropertyTooltips(boolean value) Sets whether to display member properties in tooltips. -
getDisplayNullString
boolean getDisplayNullString()Gets if the PivotTable report displays a custom string in cells that contain null values. The default value is True. -
setDisplayNullString
void setDisplayNullString(boolean value) Sets if the PivotTable report displays a custom string in cells that contain null values. -
getErrorString
String getErrorString()Returns the string displayed in cells that contain errors when the PivotTable.getDisplayErrorString() is True. The default value is an empty string (""). -
setErrorString
Sets the string displayed in cells that contain errors when the PivotTable.getDisplayErrorString() is True. -
getGrandTotalName
String getGrandTotalName()Gets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report. The default value is the string "Grand Total". -
setGrandTotalName
Sets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report. The default value is the string "Grand Total". -
getLayoutRowDefault
LayoutRowType getLayoutRowDefault()Gets the default layout settings for PivotFields when they are added to the PivotTable for the first time. -
setLayoutRowDefault
Sets the default layout settings for PivotFields when they are added to the PivotTable for the first time. -
getMergeLabels
boolean getMergeLabels()Gets if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells. -
setMergeLabels
void setMergeLabels(boolean value) Sets if the specified PivotTable report’s outer-row item, column item, subtotal, and grand total labels use merged cells. -
getName
String getName()Gets the name of the object. -
setName
Sets the name of the object. -
getNullString
String getNullString()Returns the string displayed in cells that contain null values when the PivotTable.DisplayNullString property is True. The default value is an empty string (""). -
setNullString
Sets the string displayed in cells that contain null values when the PivotTable.DisplayNullString property is True. -
getPageFieldOrder
Order getPageFieldOrder()Returns the order in which page fields are added to the PivotTable report’s layout. Can be one of the following Order constants: DownThenOver or OverThenDown. The default constant is DownThenOver. -
setPageFieldOrder
Sets the order in which page fields are added to the PivotTable report’s layout. Can be one of the following Order constants: DownThenOver or OverThenDown. The default constant is DownThenOver. -
getPageFields
IPivotFields getPageFields()Returns an object that represents a collection of all the fields that are currently showing as page fields. Read-only. -
getPageFieldWrapCount
int getPageFieldWrapCount()Returns the number of page fields in each column or row in the PivotTable report. -
setPageFieldWrapCount
void setPageFieldWrapCount(int value) Sets the number of page fields in each column or row in the PivotTable report. -
getPageRange
IRange getPageRange()Returns a Range object that represents the range that contains the page area in the PivotTable report. -
getPivotColumnAxis
IPivotAxis getPivotColumnAxis()Returns a PivotAxis object representing the entire column axis. -
getPivotRowAxis
IPivotAxis getPivotRowAxis()Returns a PivotAxis object representing the entire row axis. -
getRowFields
IPivotFields getRowFields()Returns an object that represents either a collection of all the fields that are currently showing as row fields. Read-only. -
getRowGrand
boolean getRowGrand()Gets whether the PivotTable report shows grand totals for rows. -
setRowGrand
void setRowGrand(boolean value) Sets whether the PivotTable report shows grand totals for rows. -
getRowRange
IRange getRowRange()Returns a Range object that represents the range including the row area on the PivotTable report. -
getShowTableStyleColumnHeaders
boolean getShowTableStyleColumnHeaders()Gets the boolean value if the column headers should be displayed in the PivotTable. -
setShowTableStyleColumnHeaders
void setShowTableStyleColumnHeaders(boolean value) Sets if the column headers should be displayed in the PivotTable. -
getShowTableStyleColumnStripes
boolean getShowTableStyleColumnStripes()Gets the boolean value displays banded columns in which even columns are formatted differently from odd columns. This makes PivotTableseasier to read. -
setShowTableStyleColumnStripes
void setShowTableStyleColumnStripes(boolean value) Sets the boolean value displays banded columns in which even columns are formatted differently from odd columns. This makes PivotTableseasier to read. -
getShowTableStyleLastColumn
boolean getShowTableStyleLastColumn()Gets the boolean value if displays grand total columns style. -
setShowTableStyleLastColumn
void setShowTableStyleLastColumn(boolean value) Sets the boolean value if displays grand total columns style. -
getShowTableStyleRowHeaders
boolean getShowTableStyleRowHeaders()Gets the boolean value if the row headers should be displayed in the PivotTable. -
setShowTableStyleRowHeaders
void setShowTableStyleRowHeaders(boolean value) Sets the boolean value if the row headers should be displayed in the PivotTable. -
getShowTableStyleRowStripes
boolean getShowTableStyleRowStripes()Gets the boolean value displays banded rows in which even rows are formatted differently from odd rows. This makes PivotTables easier to read. -
setShowTableStyleRowStripes
void setShowTableStyleRowStripes(boolean value) Sets the boolean value displays banded rows in which even rows are formatted differently from odd rows. This makes PivotTables easier to read. -
getTableRange1
IRange getTableRange1()Returns a Range object that represents the range containing the entire PivotTable report, but doesn’t include page fields. -
getTableRange2
IRange getTableRange2()Returns a Range object that represents the range containing the entire PivotTable report, including page fields. -
getTableStyle
String getTableStyle()Gets the style used in the body of the PivotTable report. The default value is a null string (no style is applied by default). -
setTableStyle
Sets the style used in the body of the PivotTable report. The default value is a null string (no style is applied by default). -
getTag
String getTag()Gets a string saved with the PivotTable report. -
setTag
Sets a string saved with the PivotTable report. -
addDataField
Adds a data field to a PivotTable report. Returns a PivotField object that represents the new data field.- Parameters:
field- The unique field on the server. If the source data is Online AnalyticalProcessing (OLAP), the unique field is a cube field. If the source data is non-OLAP (non-OLAP source data), the unique field is a PivotTable field.caption- The label used in the PivotTable report to identify this data field.function- The function performed in the added data field.
-
getCalculatedFields
ICalculatedFields getCalculatedFields()Returns a CalculatedFields collection that represents all the calculated fields in the specified PivotTable report. -
clearAllFilters
void clearAllFilters()Deletes all filters currently applied to the PivotTable. This includes deleting all filters in the PivotFilters collection of the PivotTable object, removing any manual filtering applied, and setting all PivotFields in the Report Filter area to the default item. -
clearTable
void clearTable()Clears a PivotTable. Clearing PivotTables includes removing all the fields and deleting all filtering and sorting applied to the PivotTables. This method resets the PivotTable to the state it had right after it was created, before any fields were added to it. -
getPivotCache
IPivotCache getPivotCache()Returns a PivotCache object that represents the cache for the specified PivotTable report. -
getPivotFields
IPivotFields getPivotFields()Returns an object that represents either a single PivotTable field (a PivotField object) or a collection of both the visible and hidden fields (a PivotFields object) in the PivotTable report. -
pivotValueCell
Retrieve the PivotValueCell object for a given PivotTable provided certain row and column indices.- Parameters:
rowline- The row position in the data area.columnline- The column position in the data area.
-
refresh
boolean refresh()Refreshes the PivotTable report from the source data. Returns True if it’s successful. -
repeatAllLabels
Sets whether to repeat item labels for all PivotFields in the specified PivotTable.- Parameters:
repeat- Specifies whether to repeat item labels for all PivotFields in the specified PivotTable.
-
setRowAxisLayout
This method is used for simultaneously setting layout options for all existing PivotFields.- Parameters:
rowLayout- Specifies the type of layout row.
-
subtotalLocation
Changes the subtotal location for all existing PivotFields. Changing the subtotal location has an immediate visual effect only for fields in outline form, but it will be set for fields in tabular form as well. -
update
void update()Updates the link or PivotTable report. -
getStyle
ITableStyle getStyle()Gets the style currently applied to the specified pivot table. -
setStyle
Sets the style currently applied to the specified pivot table. -
getPivotFormulas
IPivotFormulas getPivotFormulas()Gets a PivotFormulas object that represents the collection of formulas for the specified PivotTable report. -
getAllowMultipleFilters
boolean getAllowMultipleFilters()Gets a value that indicates whether a PivotField can have multiple filters applied to it at the same time. -
setAllowMultipleFilters
void setAllowMultipleFilters(boolean allowMultipleFilters) Sets a value that indicates whether a PivotField can have multiple filters applied to it at the same time. -
getHasAutoFormat
boolean getHasAutoFormat()Gets a value indicating whether the PivotTable report automatically adjusts column width when refreshed. Default value is true. -
setHasAutoFormat
void setHasAutoFormat(boolean value) Sets a value indicating whether the PivotTable report automatically adjusts column width when refreshed.
-