ApiPivotTable
class ApiPivotTable
Description
Class representing a PivotTable.
Instance Methods
- AddDataField
(field): ApiPivotDataField
Adds a data field to a PivotTable report.
- AddFields
(options, options.rows, options.columns, options.pages, options.addToTable)
Adds row, column, and page fields to a PivotTable report.
- ClearAllFilters
()
Deletes all filters currently applied to the PivotTable.
- ClearTable
()
Clears the Pivot Table.
- GetData
(items): number | "null"
Returns the value for the data filed in a PivotTable.
- GetPivotData
(dataField, fieldItemsArray): ApiRange
Returns a Range object with information about a data item in a PivotTable report.
- GetPivotFields
(field): ApiPivotField[] | ApiPivotField | ApiPivotDataField | "null"
Returns an collection that represents either a single PivotTable field or a collection of both the visible and hidden fields in the PivotTable report.
- PivotValueCell
(rowLine, colLine): number | string | "null"
Returns the value of a pivot table cell.
- ShowDetails
(rowLine, colLine): boolean
Show details of pivot cell.
- RefreshTable
()
Refreshes the PivotTable report from the source data.
- Update
()
Updates the PivotTable.
- SetRepeatAllLabels
(repeat)
Specifies whether to repeat item labels for all PivotFields in the specified PivotTable.
- SetRowAxisLayout
(type, compact)
Sets the way the specified PivotTable items appear—in table format or in outline format.
- SetSubtotalLocation
(type)
Sets PivotTable setting layout subtotal location.
- RemoveField
(identifier)
Removes field from all PivotTable categories.
- MoveField
(identifier, type, index)
Moves field from one category to another.
- Select
()
Selects the PivotTable.
- GetColumnFields
(): ApiPivotField[]
Returns an collection that represents a collection of all column fields.
- GetDataFields
(field): ApiPivotDataField[] | ApiPivotDataField | "null"
Returns an collection that represents either a single PivotTable data field or a collection of all visible data fields.
- GetHiddenFields
(): ApiPivotField[]
Returns array that represents all not added fields in PivotTable.
- GetVisibleFields
(): ApiPivotField[]
Returns array that represents all added fields in PivotTable.
- GetPageFields
(): ApiPivotField[]
Returns an collection that represents either a single PivotTable page field or a collection of all visible page fields.
- GetRowFields
(): ApiPivotField[]
Returns an collection that represents a collection of all row fields.
- GetName
(): string
Returns name of the PivotTable.
- SetName
(name)
Sets name of the PivotTable.
- GetColumnGrand
(): boolean
Returns PivotTable Grand Totals settings for columns.
- SetColumnGrand
(show)
Sets PivotTable Grand Totals settings for columns.
- GetRowGrand
(): boolean
Returns PivotTable Grand Totals settings for rows.
- SetRowGrand
(show)
Sets PivotTable Grand Totals settings for rows.
- GetDisplayFieldsInReportFilterArea
(): any
Returns PivotTable display fields in report filter area settings.
- SetDisplayFieldsInReportFilterArea
(type, fields)
Returns PivotTable display fields in report filter area settings.
- GetDisplayFieldCaptions
(): boolean
Returns PivotTable setting show field headers for rows and columns.
- SetDisplayFieldCaptions
(show)
Sets show field headers for rows and columns.
- GetTitle
(): string
Returns the title of the PivotTable.
- SetTitle
(title)
Sets the title of the PivotTable.
- GetDescription
(): string
Returns the description of the PivotTable.
- SetDescription
(description)
Sets the description of the PivotTable.
- GetStyleName
(): string
Returns the style name of the PivotTable.
- SetStyleName
(name)
Sets the style of the PivotTable.
- GetTableStyleRowHeaders
(): boolean
Returns the row headers style for PivotTable.
- SetTableStyleRowHeaders
(show)
Sets the row headers style for PivotTable.
- GetTableStyleColumnHeaders
(): boolean
Returns the column headers style for PivotTable.
- SetTableStyleColumnHeaders
(show)
Sets the column headers style for PivotTable.
- GetTableStyleRowStripes
(): boolean
Returns the banded rows style for PivotTable.
- SetTableStyleRowStripes
(show)
Sets the banded rows style for PivotTable.
- GetTableStyleColumnStripes
(): boolean
Returns the banded columns style for PivotTable.
- SetTableStyleColumnStripes
(show)
Sets the banded columns style for PivotTable.
- GetSource
(): ApiRange
Returns source for the PivotTable.
- SetSource
(source)
Sets source for the PivotTable.
- GetColumnRange
(): ApiRange | "null"
Returns a Range object that represents the range that contains the column area in the PivotTable report.
- GetRowRange
(): ApiRange | "null"
Returns a Range object that represents the range that contains the row area in the PivotTable report.
- GetDataBodyRange
(): ApiRange
Returns a Range object that represents the range of values in a PivotTable.
- GetTableRange1
(): ApiRange | "null"
Returns a Range object that represents the range containing the entire PivotTable report, but doesn't include page fields.
- GetTableRange2
(): ApiRange | "null"
Returns a Range object that represents the range containing the entire PivotTable report, including page fields.
- GetGrandTotalName
(): string
Returns the text string label that is displayed in the grand total column or row heading in the specified PivotTable report.
- SetGrandTotalName
(name)
Sets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report.
- SetLayoutBlankLine
(insert)
Sets PivotTable setting insert blank rows after each item.
- SetLayoutSubtotals
(show)
Sets PivotTable setting show subtotals.
- GetParent
(): ApiWorksheet
Returns Pivot Table parent
Instance Properties
- Name
string
Returns or sets name of the PivotTable.
- ColumnGrand
boolean
Returns or sets PivotTable Grand Totals settings for columns.
- RowGrand
boolean
Returns or sets PivotTable Grand Totals settings for rows.
- DisplayFieldCaptions
boolean
Returns or set show field headers for rows and columns.
- Title
string
Returns or sets the title of the PivotTable.
- Description
string
Returns or sets the description of the PivotTable.
- StyleName
string
Returns or sets the style name of the PivotTable.
- ShowTableStyleRowHeaders
boolean
Returns or sets the row headers style for PivotTable.
- ShowTableStyleColumnHeaders
boolean
Returns or sets the column headers style for PivotTable.
- ShowTableStyleRowStripes
boolean
Returns or sets the banded rows style for PivotTable.
- ShowTableStyleColumnStripes
boolean
Returns or sets the banded columns style for PivotTable.
- Source
ApiRange
Returns or sets source for the PivotTable.
- ColumnRange
ApiRange | "null"
Returns a Range object that represents the range that contains the column area in the PivotTable report.
- RowRange
ApiRange | "null"
Returns a Range object that represents the range that contains the row area in the PivotTable report.
- DataBodyRange
ApiRange
Returns a Range object that represents the range of values in a PivotTable.
- TableRange1
ApiRange | "null"
Returns a Range object that represents the range containing the entire PivotTable report, but doesn't include page fields.
- TableRange2
ApiRange | "null"
Returns a Range object that represents the range containing the entire PivotTable report, including page fields
- GrandTotalName
string
Sets the text string label that is displayed in the grand total column or row heading in the specified PivotTable report.
- RepeatAllLabels
boolean
Specifies whether to repeat item labels for all PivotFields in the specified PivotTable.
- RowAxisLayout
object
Sets the way the specified PivotTable items appear—in table format or in outline format.
- LayoutBlankLine
boolean
Sets PivotTable setting insert blank rows after each item.
- LayoutSubtotals
boolean
Sets PivotTable setting show subtotals.
- SubtotalLocation
number
Sets PivotTable setting layout subtotal location.
- PivotFields
ApiPivotField[]
Returns all PivotFields in PivotTable.
- ColumnFields
ApiPivotField[]
Returns array that are currently showing as column fields in PivotTable.
- DataFields
ApiPivotField[]
Returns array that are currently showing values fields in PivotTable.
- HiddenFields
ApiPivotField[]
Returns array that represents all not added fields in PivotTable.
- VisibleFields
ApiPivotField[]
Returns array that represents all not added fields in PivotTable.
- PageFields
ApiPivotField[]
Returns array that are currently showing as page fields in PivotTable.
- RowFields
ApiPivotField[]
Returns array that are currently showing as row fields in PivotTable.