小编Nei*_*mka的帖子

将参数/参数从Google工作表自定义函数传递到脚本函数

我坚持做一些基本的事情.如何将参数传递给Google表格自定义函数.

我在Apps脚本代码编辑器中有一个函数定义为:

function usageByMonth(range,theDate) {
    [ do something with the arguments passed ]
}
Run Code Online (Sandbox Code Playgroud)

在我的Google表格中,该功能用作

=usageByMonth('Source Meter Readings'!A5:A,B1)
Run Code Online (Sandbox Code Playgroud)

在尝试调试函数时,我发现这两个参数是"未定义的".我已经查看了很多帖子,甚至直接从示例中复制了函数,结果相同.

arguments google-sheets google-apps-script custom-function

12
推荐指数
1
解决办法
2万
查看次数