问题描述
我正在寻找一种以编程方式填充电子表格的方式,该电子表格可以基于登录用户过滤来自其他电子表格的数据。
我可以使用电子表格中的查询功能。
但是,无法找出从apps脚本调用查询函数的方法?
可以这样做吗?将不胜感激示例代码。
Thanks。
不,没有API可用于查询功能,它允许从Google Apps脚本。 (实际上,没有办法用这种方式调用任何电子表格函数。)
尽管你自己写了一些类似的功能, 包含各种过滤器函数,让你检索匹配的行。
I'm looking for a way to programmatically populate a spreadsheet that filters data from another spreadsheet based on the logged in user.
I am able to do this using the query function inside a spreadsheet. BUT, unable to figure out a way to call the query function from apps script?
Can this be done? Would appreciate sample code.Thanks.
No, there is no API for the Query function that allows it to be called from Google Apps Script. (There is no way to call ANY spreadsheet function in this way, in fact.)
You can get some similar functionality without writing it all yourself, though. The 2D Arrays Library includes a variety of "filter" functions that let you retrieve matching rows.
这篇关于谷歌电子表格'查询'功能可以在谷歌应用程序脚本中使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!