【问题标题】:How can I use FormApp.create in a google sheet custom function? [duplicate]如何在 Google 表格自定义函数中使用 FormApp.create? [复制]
【发布时间】:2020-08-23 15:15:07
【问题描述】:

我想在 google sheet 中创建一个自定义函数,以便它可以将该表的数据作为函数的输入。输出将是创建的表单的 URL。我有可以创建表单并生成 URL 的 google app 脚本。

但是,当我尝试实现该功能时,它给了我以下错误:

Exception: You do not have permission to call FormApp.create. Required permissions: https://www.googleapis.com/auth/forms 

我查看了其他帖子。但它只是不起作用。

【问题讨论】:

  • 虽然上面的链接是关于“openById”的,但同样的答案也适用。

标签: google-apps-script google-sheets google-forms custom-function


【解决方案1】:

来自documentation

与大多数其他类型的 Apps 脚本不同,自定义函数从不要求用户授权访问个人数据。因此,他们只能调用无法访问个人数据的服务[.]

FormApp.create 会通过在您的云端硬盘中创建某些内容来操纵您的个人数据,这将违反在自定义函数中使用 Apps 脚本服务的规则。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-09
    • 2021-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多