删除所有文件程序条件,但保留过滤器 [英] Delete all filer criterias but preserve filter

查看:57
本文介绍了删除所有文件程序条件,但保留过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想清除所有过滤器规则,但保留过滤器本身.

I want to clear all filter rules, but leave the filter itself.

有直接,快速的方法吗?

Is there a direct and fast way to do it?

我找到的代码是:

var filter = sheet.getFilter(); 

它获取过滤器对象,并且我使用filter#的选项数为

It gets the filter object, and the number of options I have with filter# is limited.

注意:filter.remove()删除了此过滤器,但我需要保留它.

Note: filter.remove() removes this filter, but I need to preserve it.

推荐答案

您只想删除基本过滤器的标准,而不删除基本过滤器.如果我的理解是正确的,那么如何使用Sheets API?示例脚本如下.使用此脚本时,请在高级Google服务和API控制台中启用Sheets API.

You want to remove only the criteria of basic filters while the basic filter is not removed . If my understanding is correct, how about using Sheets API? The sample script is as follows. When you use this script, please enable Sheets API at Advanced Google Services and API console.

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆