[英]How can I create a stand-alone onEdit(e) trigger with a 'from Spreadsheet' event source using G-Suite Developer Hub?
I am trying to create an onEdit(e) trigger through Google App Script, however, when going to Edit -> Current Project Triggers -> Add Trigger -> "Event Source" I DO NOT get the option to select "From Spreadsheet".我正在尝试通过 Google App Script 创建一个 onEdit(e) 触发器,但是,当转到 Edit -> Current Project Triggers -> Add Trigger ->“Event Source”时,我没有选择“From Spreadsheet”的选项。
I simply like for this function to execute when there is an edit made to a cell on Google Sheets.我只是喜欢在对 Google 表格上的单元格进行编辑时执行此功能。
I have already tried creating an Installable Trigger (myOwnEditTrigger) through the G-Suite Developer Hub, however, I am forced to select "From Calendar" or "Time-Driven" event source, neither of the two are helpful for my project.我已经尝试通过 G-Suite 开发人员中心创建可安装触发器 (myOwnEditTrigger),但是,我被迫选择“来自日历”或“时间驱动”事件源,这两者都对我的项目没有帮助。
I am also trying to avoid programming the trigger through (.gs) code.我还试图避免通过 (.gs) 代码对触发器进行编程。 If that is my only option, then where can I find the contents of this code?
如果这是我唯一的选择,那么我在哪里可以找到此代码的内容?
I am expecting the the return value of parameter 'e' from onEdit(e) to return a Spreadsheet containing the edited data as described under "edit" on this page https://developers.google.com/apps-script/guides/triggers/events我期待来自 onEdit(e) 的参数“e”的返回值返回一个包含编辑数据的电子表格,如本页https://developers.google.com/apps-script/guides/触发器/事件
From a Spreadsheet, go to tools > script editor从电子表格中,转到工具 > 脚本编辑器
and then write a script like然后写一个脚本
onEdit(e){
Logger.log(e);
}
从 Google Developer Hub ( https://script.google.com ),我们只能将电子表格触发器添加到绑定到电子表格项目/电子表格包含的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.