Access and modify pivot table filters.
Methods
Method | Return type | Brief description |
---|---|---|
getFilterCriteria() | FilterCriteria | Returns the filter criteria for this pivot filter. |
getPivotTable() | PivotTable | Returns the PivotTable that this filter belongs to. |
getSourceDataColumn() | Integer | Returns the number of the source data column this filter operates on. |
getSourceDataSourceColumn() | DataSourceColumn | Returns the data source column the filter operates on. |
remove() | void | Removes this pivot filter from the pivot table. |
setFilterCriteria(filterCriteria) | PivotFilter | Sets the filter criteria for this pivot filter. |
Detailed documentation
getFilterCriteria()
Returns the filter criteria for this pivot filter.
Return
FilterCriteria
— the filter criteria for this pivot filter
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getPivotTable()
Returns the PivotTable
that this filter belongs to.
Return
PivotTable
— the pivot table this filter belongs to
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSourceDataColumn()
Returns the number of the source data column this filter operates on. These indices are 1-based, for example if this filter applies to data in column A of the spreadsheet this method returns "1."
Return
Integer
— the number of the source data column this filter applies to
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSourceDataSourceColumn()
Returns the data source column the filter operates on. Returns null
if the pivot table
is not a {DataSourcePivotTableApi}.
Return
DataSourceColumn
— The data source column the filter operates on.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
remove()
Removes this pivot filter from the pivot table.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setFilterCriteria(filterCriteria)
Sets the filter criteria for this pivot filter.
Parameters
Name | Type | Description |
---|---|---|
filterCriteria | FilterCriteria | The filter criteria to set. |
Return
PivotFilter
— the pivot filter for chaining
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets