A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/apps-script/reference/spreadsheet/pivot-table below:

Class PivotTable | Apps Script

Class PivotTable

Stay organized with collections Save and categorize content based on your preferences.

PivotTable

Access and modify pivot tables.

Detailed documentation addCalculatedPivotValue(name, formula)

Creates a new pivot value in the pivot table calculated from the specified formula with the specified name.

Parameters Name Type Description name String The name for this calculated pivot value. formula String The formula used to calculate this value. Return

PivotValue — the newly created PivotValue

Scripts that use this method require authorization with one or more of the following scopes:

addColumnGroup(sourceDataColumn)

Defines a new pivot column grouping in the pivot table. The specified sourceDataColumn indicates the column in the source data this grouping is based on.

Parameters Name Type Description sourceDataColumn Integer The number of the column this group summarizes. This index represents the absolute number of the column in the spreadsheet; 1 representing column "A," 2 representing column B, etc. Return

PivotGroup — the newly created PivotGroup

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

addFilter(sourceDataColumn, filterCriteria)

Creates a new pivot filter for the pivot table. The specified sourceDataColumn indicates the column in the source data this filter operates on.

Parameters Name Type Description sourceDataColumn Integer The number of the column this group summarizes. This index represents the absolute number of the column in the spreadsheet; 1 representing column "A," 2 representing column B, etc. filterCriteria FilterCriteria The filter criteria used to perform the filtering. Return

PivotFilter — the newly created PivotFilter

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

addPivotValue(sourceDataColumn, summarizeFunction)

Defines a new pivot value in the pivot table with the specified summarizeFunction. The specified sourceDataColumn indicates the column in the source data this value is based on.

Parameters Name Type Description sourceDataColumn Integer The number of the column this group summarizes. This index represents the absolute number of the column in the spreadsheet; 1 representing column "A," 2 representing column B, etc. summarizeFunction PivotTableSummarizeFunction Return

PivotValue — the newly created PivotValue

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

addRowGroup(sourceDataColumn)

Defines a new pivot row grouping in the pivot table. The specified sourceDataColumn indicates the column in the source data this grouping is based on.

Parameters Name Type Description sourceDataColumn Integer The number of the column this group summarizes. This index represents the absolute number of the column in the spreadsheet; 1 representing column "A," 2 representing column B, etc. Return

PivotGroup — the newly created PivotGroup

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

asDataSourcePivotTable()

Returns the pivot table as a data source pivot table if the pivot table is linked to a DataSource, or null otherwise.

Return

DataSourcePivotTable — A data source pivot table.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getAnchorCell()

Returns the Range representing the cell where this pivot table is anchored.

Return

Range — this pivot table's anchor cell

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getColumnGroups()

Returns an ordered list of the column groups in this pivot table.

Return

PivotGroup[] — the column groups in this pivot table

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getFilters()

Returns an ordered list of the filters in this pivot table.

Return

PivotFilter[] — the filters in this pivot table

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getPivotValues()

Returns an ordered list of the pivot values in this pivot table.

Return

PivotValue[] — the pivot values in this pivot table

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getRowGroups()

Returns an ordered list of the row groups in this pivot table.

Return

PivotGroup[] — the row groups in this pivot table

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getSourceDataRange()

Returns the source data range on which the pivot table is constructed.

Return

Range — The source data range of this pivot table.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

getValuesDisplayOrientation()

Returns whether values are displayed as rows or columns.

Return

Dimension — whether values are displayed as rows or columns

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

remove()

Deletes this pivot table. Further operations on this pivot table results in an error.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

setValuesDisplayOrientation(dimension)

Sets the layout of this pivot table to display values as columns or rows.

Parameters Name Type Description dimension Dimension The dimension indicating how to display pivot values. Return

PivotTable — the pivot table for chaining

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-03 UTC."],[[["The `PivotTable` class allows programmatic access and modification of pivot tables within Google Sheets."],["Developers can utilize methods to add calculated values, define row/column groupings, apply filters, and manage the overall structure of pivot tables."],["The `PivotTable` object provides functionalities to retrieve its anchor cell, source data range, column/row groups, filters, and pivot values, giving comprehensive control."],["It offers features to modify the layout, like setting the display orientation for values as rows or columns, and can be completely removed using the `remove()` method."],["Each method within the `PivotTable` class requires specific authorization scopes to ensure secure access and manipulation of spreadsheet data."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4