且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

保护每个人的细胞,除了功能

更新时间:2023-02-05 12:22:47

是的,有可能.

第一个选项

Yes, it is possible.

First Option

使用服务帐户. //developers.google.com/identity/protocols/OAuth2ServiceAccount"rel =" nofollow noreferrer>假冒文件所有者.

Use the service account which would impersonate the owner of the document.

此处是如何合并服务的示例Apps脚本中的帐户.

Here is an example how to incorporate a service account in Apps Script.

确保您将必要的范围赋予服务帐户 并启用全域委派.

Make sure that you give to the service account the necessary scopes and enable domain-wide delegation.

第二个选项

Second option

将脚本部署为 Web应用,并以

第三种选择

Third Option

使用可安装触发器-这将代表您运行授权后.您可以例如设置一个可安装的onEdit触发器,如果​​用户编辑了某个单元格(例如"A20"),它将触发脚本功能.

Use an installable trigger - this will run on your behalf after you authorize it. You can e.g. set-up an installable onEdit trigger that will fire the script function if a certain cell (e.g. "A20") is edited by the user.