ApiPivotTable
Class representing a pivot table.
Properties
| Name | Type | Description |
|---|---|---|
| ColumnFields | ApiPivotField[] | Returns an array that is currently displayed as column fields in the pivot table. |
| ColumnGrand | boolean | Returns or sets the Grand Totals setting for the pivot table columns. |
| ColumnRange | ApiRange | null | Returns a Range object that represents the column area in the pivot table report. |
| DataBodyRange | ApiRange | Returns a Range object that represents the range of values in the pivot table. |
| DataFields | ApiPivotField[] | Returns an array that is currently displayed as data fields in the pivot table. |
| Description | string | Returns or sets the pivot table description. |
| DisplayFieldCaptions | boolean | Returns or sets the setting which specifies whether to display field headers for rows and columns. |
| GrandTotalName | string | Returns or sets the text string label that is displayed in the grand total column or row heading in the specified pivot table report. |
| HiddenFields | ApiPivotField[] | Returns an array that represents all hidden fields in the pivot table. |
| LayoutBlankLine | boolean | Sets the setting which specifies whether to insert blank rows after each item in the pivot table. |
| LayoutSubtotals | boolean | Sets the setting which specifies whether to show subtotals in the pivot table. |
| Name | string | Returns or sets a name of the pivot table. |
| PageFields | ApiPivotField[] | Returns an array that is currently displayed as page fields in the pivot table. |
| Parent | ApiWorksheet | Returns the parent object for the current pivot table. |
| PivotFields | ApiPivotField[] | Returns all pivot fields in the pivot table. |
| RepeatAllLabels | boolean | Specifies whether to repeat item labels for all pivot fields in the specified pivot table. |
| RowAxisLayout | object | Sets the way the specified pivot table items appear — in table format or in outline format. |
| RowFields | ApiPivotField[] | Returns an array that is currently displayed as row fields in the pivot table. |
| RowGrand | boolean | Returns or sets the Grand Totals setting for the pivot table rows. |
| RowRange | ApiRange | null | Returns a Range object that represents the row area in the pivot table report. |
| ShowTableStyleColumnHeaders | boolean | Returns or sets the setting which specifies whether the column headers of the pivot table will be highlighted with the special formatting. |
| ShowTableStyleColumnStripes | boolean | Returns or sets the setting which specifies whether the background color alternation for odd and even columns will be enabled for the pivot table. |
| ShowTableStyleRowHeaders | boolean | Returns or sets the setting which specifies whether the row headers of the pivot table will be highlighted with the special formatting. |
| ShowTableStyleRowStripes | boolean | Returns or sets the setting which specifies whether the background color alternation for odd and even rows will be enabled for the pivot table. |
| Source | ApiRange | Returns or sets the source range for the pivot table. |
| StyleName | string | Returns or sets the pivot table style name. |
| SubtotalLocation | number | Sets the layout subtotal location. |
| TableRange1 | ApiRange | null | Returns a Range object that represents the entire pivot table report, but doesn't include page fields. |
| TableRange2 | ApiRange | null | Returns a Range object that represents the entire pivot table report, including page fields. |
| Title | string | Returns or sets the pivot table title. |
| VisibleFields | ApiPivotField[] | Returns an array that represents all visible fields in the pivot table. |
Methods
The following table lists the available methods.
| Method | Returns | Description |
|---|---|---|
| AddDataField | ApiPivotDataField | Adds a data field to the pivot table report. |
| AddFields | None | Adds the row, column, and page fields to the pivot table report. |
| ClearAllFilters | None | Deletes all filters currently applied to the pivot table. |
| ClearTable | None | Clears the pivot table. |
| GetColumnFields | ApiPivotField[] | Returns a collection that is currently displayed as column fields in the pivot table. |
| GetColumnGrand | boolean | Returns the Grand Totals setting of the pivot table columns. |
| GetColumnRange | ApiRange | null | Returns a Range object that represents the column area in the pivot table report. |
| GetData | number | null | Returns the value for the data field in a pivot table. |
| GetDataBodyRange | ApiRange | Returns a Range object that represents the range of values in the pivot table. |
| GetDataFields | ApiPivotDataField[] | ApiPivotDataField | null | Returns a collection that represents either a single pivot table data field or a collection of all visible data fields. |
| GetDescription | string | Returns the pivot table description. |
| GetDisplayFieldCaptions | boolean | Returns the setting which specifies whether to display field headers for rows and columns. |
| GetDisplayFieldsInReportFilterArea | PivotTableFilterAreaInfo | Returns the pivot table display fields in the report filter area settings. |
| GetGrandTotalName | string | Returns the text string label that is displayed in the grand total column or row heading in the specified pivot table report. |
| GetHiddenFields | ApiPivotField[] | Returns an array that represents all the hidden fields in the pivot table. |
| GetName | string | Returns the pivot table name. |
| GetPageFields | ApiPivotField[] | Returns a collection that represents either a single pivot table page field or a collection of all visible page fields. |
| GetParent | ApiWorksheet | Returns the parent object for the current pivot table. |
| GetPivotData | ApiRange | Returns a Range object with information about a data item in the pivot table report. |
| GetPivotFields | ApiPivotField[] | ApiPivotField | ApiPivotDataField | null | Returns a collection that represents either a single pivot table field or a collection of both the visible and hidden fields in the pivot table report. |
| GetRowFields | ApiPivotField[] | Returns a collection that is currently displayed as row fields in the pivot table. |
| GetRowGrand | boolean | Returns the Grand Totals setting of the pivot table rows. |
| GetRowRange | ApiRange | null | Returns a Range object that represents the row area in the pivot table report. |
| GetSource | ApiRange | Returns the source range for the pivot table. |
| GetStyleName | string | Returns the pivot table style name. |
| GetTableRange1 | ApiRange | null | Returns a Range object that represents the entire pivot table report, but doesn't include page fields. |
| GetTableRange2 | ApiRange | null | Returns a Range object that represents the entire pivot table report, including page fields. |
| GetTableStyleColumnHeaders | boolean | Returns the setting which specifies whether the column headers of the pivot table will be highlighted with the special formatting. |
| GetTableStyleColumnStripes | boolean | Returns the setting which specifies whether the background color alternation for odd and even columns will be enabled for the pivot table. |
| GetTableStyleRowHeaders | boolean | Returns the setting which specifies whether the row headers of the pivot table will be highlighted with the special formatting. |
| GetTableStyleRowStripes | boolean | Returns the setting which specifies whether the background color alternation for odd and even rows will be enabled for the pivot table. |
| GetTitle | string | Returns the pivot table title. |
| GetVisibleFields | ApiPivotField[] | Returns an array that represents all the visible fields in the pivot table. |
| MoveField | None | Moves the specified field from one category to another. |
| PivotValueCell | number | string | null | Returns the value of a pivot table cell. |
| RefreshTable | None | Refreshes the pivot table report from the source data. |
| RemoveField | None | Removes the specified field from all the pivot table categories. |
| Select | None | Selects the current pivot table. |
| SetColumnGrand | None | Sets the Grand Totals setting to the pivot table columns. |
| SetDescription | None | Sets the pivot table description. |
| SetDisplayFieldCaptions | None | Sets whether to display field headers for rows and columns. |
| SetDisplayFieldsInReportFilterArea | None | Sets the pivot table display fields in the report filter area settings. |
| SetGrandTotalName | None | Sets the text string label that is displayed in the grand total column or row heading in the specified pivot table report. |
| SetLayoutBlankLine | None | Sets the setting which specifies whether to insert blank rows after each item. |
| SetLayoutSubtotals | None | Sets the setting which specifies whether to show subtotals. |
| SetName | None | Sets the pivot table name. |
| SetRepeatAllLabels | None | Specifies whether to repeat item labels for all pivot fields in the specified pivot table. |
| SetRowAxisLayout | None | Sets the way the specified pivot table items appear — in table format or in outline format. |
| SetRowGrand | None | Sets the Grand Totals setting to the pivot table rows. |
| SetSource | None | Sets the source range for the pivot table. |
| SetStyleName | None | Sets the pivot table style name. |
| SetSubtotalLocation | None | Sets the layout subtotal location in the pivot table. |
| SetTableStyleColumnHeaders | None | Sets the setting which specifies whether the column headers of the pivot table will be highlighted with the special formatting. |
| SetTableStyleColumnStripes | None | Sets the setting which specifies whether the background color alternation for odd and even columns will be enabled for the pivot table. |
| SetTableStyleRowHeaders | None | Sets the setting which specifies whether the row headers of the pivot table will be highlighted with the special formatting. |
| SetTableStyleRowStripes | None | Sets the setting which specifies whether the background color alternation for odd and even rows will be enabled for the pivot table. |
| SetTitle | None | Sets the pivot table title. |
| ShowDetails | boolean | Shows details of the pivot table cell. |
| Update | None | Updates the current pivot table. |