访问和修改现有数据源工作表过滤条件。如需创建新的数据源工作表过滤条件,请使用
DataSourceSheet.addFilter(columnName, filterCriteria)。
请仅将此类用于与数据库连接的数据。
方法
| 方法 | 返回值类型 | 简介 |
|---|---|---|
get | Data | 返回此过滤条件所应用到的数据源列。 |
get | Data | 返回此过滤条件所属的 Data。 |
get | Filter | 返回此过滤条件的过滤条件。 |
remove() | void | 从数据源对象中移除此过滤条件。 |
set | Data | 设置此过滤条件的过滤条件。 |
详细文档
getDataSourceColumn()
返回此过滤条件所应用到的数据源列。
返回
DataSourceColumn - 数据源列。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getDataSourceSheet()
返回此过滤条件所属的 DataSourceSheet。
返回
DataSourceSheet - 此过滤条件所属的数据源工作表。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
getFilterCriteria()
返回此过滤条件的过滤条件。
返回
FilterCriteria - 此过滤条件的过滤条件。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
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 | 要设置的过滤条件。 |
返回
DataSourceSheetFilter - 用于链接的过滤条件。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets