如何在谷歌应用程序脚本中使用本机电子表格功能? [英] How to use native spreadsheet functions in google apps script?

查看:22
本文介绍了如何在谷歌应用程序脚本中使用本机电子表格功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为谷歌电子表格编写代码时,是否可以在谷歌应用程序脚本中使用 sum() 或 today() 等原生电子表格函数?如果是这样,我该怎么做?

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?

推荐答案

Google Apps Script 是 JavaScript,电子表格功能不可用并且使用类似 setFormula 后跟 getValue 的解决方法> 不仅麻烦,而且非常缓慢和低效.使用 JavaScript 和 Google 服务来操作从电子表格中获取的数据并将数据写回到一个 setValues() 中,您会受到更好的启发.

Google 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屋!

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