我在google工作表脚本编辑器中运行脚本,以触发我使用可安装触发器onChange()的脚本。 我按照文档中提供的步骤进行操作。 但是当我在工作表上做某事时,什么也没发生。
这是我的代码
function createSpreadsheetChangeTrigger() { var ss = SpreadsheetApp.getActive(); ScriptApp.newTrigger('onChange') .forSpreadsheet(ss) .onChange() .create(); } function onChange(){ Logger.log("onChange event fired"); }我不明白出了什么问题。 有人可以帮我吗?
谢谢
I am running a script in google sheets script editor, to trigger the script I use the installable trigger onChange(). I followed the steps available on in the documentations. But nothing happen when I do something on my worksheet.
Here is my code
function createSpreadsheetChangeTrigger() { var ss = SpreadsheetApp.getActive(); ScriptApp.newTrigger('onChange') .forSpreadsheet(ss) .onChange() .create(); } function onChange(){ Logger.log("onChange event fired"); }I don't understand what is going wrong. Can anyone help me please?
Thanks
最满意答案
你有什么工作,但你必须首先实际“安装”触发器。 要做到这一点,请转到编辑 - >当前项目的触发器。 单击链接无触发器设置。 点击此处立即添加一个并进行以下选择:
现在,在更改电子表格后检查您的记录器,您会得到:
希望这可以帮助!
What you have will work, but you have to actually "install" the trigger first. To do that go to Edit --> Current Project's Triggers. Click on the link No triggers set up. Click here to add one now and make the selections below:
Now check your Logger after making a change to your spreadsheet and you get:
Hope this helps!
更多推荐
onChange,function,脚本,电脑培训,计算机培训,IT培训"/> <meta name="descript
发布评论