[英]give edit permission by script (google apps script)
I have google spreadsheet with script and sidebar (html input fields).我有带有脚本和侧边栏(html 输入字段)的谷歌电子表格。 I will share this spreadsheet with my colleagues.
我将与我的同事分享这个电子表格。 and my colleagues will make a copy of my spreadsheet for personal use.
我的同事会复制我的电子表格供个人使用。
this is problem这是问题
when I edit my script, I want to edit my colleagues's spreadsheet script that copies of my spreadsheet.当我编辑我的脚本时,我想编辑我的同事的电子表格脚本,该脚本是我的电子表格的副本。
for this, Here is my idea.为此,这是我的想法。
For the first part, you can just add the lines;对于第一部分,您可以只添加行;
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addEditor('----@-------');
To directly create / edit script files you'll have to use the App Script API要直接创建/编辑脚本文件,您必须使用 App Script API
For the second part, you can write the scripts in a stand-alone file and use the script library in the spreadsheet.对于第二部分,您可以在独立文件中编写脚本并使用电子表格中的脚本库。 Leaving the script in development mode will always use the current code in the script file.
将脚本留在开发模式将始终使用脚本文件中的当前代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.