通过matchpatern过滤“ANY”在电子表格中[google-apps-script] [英] Filter by matchpatern"ANY" in a spreadsheet [google-apps-script]

查看:105
本文介绍了通过matchpatern过滤“ANY”在电子表格中[google-apps-script]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在寻找筛选电子表格单元格,其中存在不同的类别:例如,

<1>环境
2环境,商业
3商业,工作,环境,旅游



<我已经尝试使用带有MatchType(ANY)的StringFilter工具,但搜索仅返回单元格的第一个单词。例如,搜索'Business'在单元格Environment,Business中找不到'Business'。我的代码:

  var categoryFilter = Charts.newStringFilter()
.setFilterColumnIndex(5)
.setMatchType (Charts.MatchType.ANY)
.build();

我的第一个目标是使用newCategoryFilter工具,但我无法使用MatchType过滤器,结果是列表框中的商业,工作,环境,旅游等不良类别。我的第一个代码如下所示:

  var themeFilter = Charts.newCategoryFilter()
.setFilterColumnLabel(Categories
.build();

我没有找到解决方案,所以我希望你能帮助我:)!感谢提前。

Timothée。

解决方案

我做了一些测试,而这看起来像是图表服务中的一个错误。请在Apps脚本问题跟踪器上提出问题。

i am new(bi) to google apps script and i have some problems !

I am looking for filter a spreadsheet cell where there is differents categories : for exemple

1 Environment 2 Environment, Business 3 Business, Work, Environment, Tourism

i have tryed to use the StringFilter tool with a MatchType(ANY) but the search only returns the first word of the cell.For example the search 'Business' will not find 'Business' in the cell "Environment , Business" . My code:

     var categoryFilter = Charts.newStringFilter()
   .setFilterColumnIndex(5)
   .setMatchType(Charts.MatchType.ANY)
   .build();

My first objective was to use the newCategoryFilter tool but i couldn't use the MatchType Filter, and the result was bad categories like "Business, Work, Environment, Tourism" in the listBox.And my first code looked like this :

     var themeFilter = Charts.newCategoryFilter()
  .setFilterColumnLabel("Categories"
  .build();

I didnt find a solution yet so i hope you gonna help me :) ! thanks in advance.

Timothée.

解决方案

I did some tests, and this looks like a bug in the Charts service. Please file an issue on the Apps Script issue tracker.

这篇关于通过matchpatern过滤“ANY”在电子表格中[google-apps-script]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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