问题描述
我看到过类似的问题,但没有一个答案是A)我可以使用的答案,或者是B)是相同的目标.去吧:
I have seen similar questions asked, but none of them had A) an answer that I can use or B) the same objective. Here goes:
我有一个Google表格的模板(称为处理中"),并绑定了脚本.当另一个脚本运行(copyTemplate.gs)时,它将基于唯一的ID号创建一个新的Processing副本.绑定的脚本也会被复制,这很棒.
I have a template of a Google Sheet (call it "Processing") with a script bound to it. When another script runs (copyTemplate.gs), it creates a new copy of Processing based on a unique ID number. The bound script is also copied, which is great.
但是我必须手动授权处理脚本才能运行.有没有一种方法预进行授权,这样我就不必为处理电子表格的每份副本进行授权了?我希望这对于那些不太懂技术的人来说是用户友好的.每次必须授权一次,这很繁琐,而且毫无疑问,有人会设法将其弄乱.
But I have to manually authorize the Processing script to run. Is there a way to pre-authorize so that I don't have to authorize EVERY copy of the Processing spreadsheet? I want this to be user friendly for those less tech savvy. Having to authorize it every single time is tedious and no doubt someone will manage to mess it up.
推荐答案
每个脚本都在用户的帐户下作为独立的应用程序运行.这就是每个人都需要授权的原因.如果您将脚本发布为附加组件,然后在域级别(假设使用Google Apps for Work)授权该附加组件,那么这是一种规避要求的方法.)
Every script runs as a separate application under the user's account. this is why each needs authorising. if you publish your script as an add-on and then authorise that add-on at domain level (assuming Google Apps for Work) then this is a way to circumvent the requirement.)
这篇关于复制Google表格中的模板并自动授权脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!