访问和修改数据透视表过滤条件。
方法
| 方法 | 返回值类型 | 简介 |
|---|---|---|
get | Filter | 返回此数据透视表过滤条件的过滤条件。 |
get | Pivot | 返回此过滤条件所属的 Pivot。 |
get | Integer | 返回此过滤条件所作用的源数据列的编号。 |
get | Data | 返回过滤条件所作用的数据源列。 |
remove() | void | 从数据透视表中移除此数据透视表过滤条件。 |
set | Pivot | 设置此数据透视表过滤条件的过滤条件。 |
详细文档
getFilterCriteria()
返回此数据透视表过滤条件的过滤条件。
返回
FilterCriteria - 此数据透视表过滤条件的过滤条件。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getPivotTable()
返回此过滤条件所属的 PivotTable。
返回
PivotTable - 此过滤条件所属的数据透视表。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getSourceDataColumn()
返回此过滤条件所作用的源数据列的编号。这些索引从 1 开始,例如,如果此过滤条件适用于电子表格的 A 列中的数据,则此方法会返回“1”。
返回
Integer - 此过滤条件所作用的源数据列的编号。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getSourceDataSourceColumn()
返回过滤条件所作用的数据源列。如果数据透视表不是 {DataSourcePivotTableApi},则返回 null。
返回
DataSourceColumn|null - 过滤条件所作用的数据源列。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
remove()
从数据透视表中移除此数据透视表过滤条件。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
setFilterCriteria(filterCriteria)
设置此数据透视表过滤条件的过滤条件。
参数
| 名称 | 类型 | 说明 |
|---|---|---|
filter | Filter | 要设置的过滤条件。 |
返回
PivotFilter - 用于链接的数据透视表过滤条件。
授权
使用此方法需要获得以下一个或多个范围的授权的脚本:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets