如何在谷歌应用脚本中使用本地电子表格功能? [英] How to use native spreadsheet functions in google apps script?
问题描述
编写谷歌电子表格代码时,是否可以在谷歌应用程序脚本中使用本地电子表格函数,如sum()或today()?如果是这样,我该怎么做? 解决方案
Goggle Apps脚本是JavaScript,电子表格功能不可用并且使用类似的解决方法setFormula后跟getValue不仅麻烦,而且非常慢并且效率低下。使用JavaScript和Google服务来处理从电子表格中获取的数据并将数据写回到一个setValues()中将会更好地受到启发。
Is it possible to use native spreadsheet functions such as sum() or today() in google apps script, when writing code for google Spreadsheet? If so, how do I do it?
Goggle Apps Script is JavaScript, spreadsheets functions are not available and using a workaround like setFormula followed by getValue is not only cumbersome but really slow and inefficient.You will be better inspired to use JavaScript and Google services to manipulate data taken from a spreadsheet and write the data back in one single setValues().
这篇关于如何在谷歌应用脚本中使用本地电子表格功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!