【问题标题】:How to run a script which in the google spreadsheet from the Android Google Drive App?如何从 Android Google Drive App 运行 google 电子表格中的脚本?
【发布时间】:2016-10-24 16:22:11
【问题描述】:

我尝试了以下方法:

  1. 创建菜单项
    -> 在 android google drive 应用程序中找不到菜单。

  2. 绘制按钮并分配功能
    -> android google drive 应用无法显示按钮。

  3. 将函数添加到 onOpen()
    -> 当我从 android google drive 应用程序打开电子表格时,该功能不会被执行。

那么,该怎么做呢?

【问题讨论】:

标签: android google-apps-script google-sheets


【解决方案1】:

我发现在 Google 表格应用程序中运行脚本的唯一方法是使用 onEdit() 触发器。您设计了一个永远不会作为真实数据输入的代码。当您输入代码onEdit() 时,就可以像从菜单或脚本编辑器中运行它一样运行脚本功能。听上去很老套,但实际上效果很好。

【讨论】:

    【解决方案2】:

    仅供参考。 现在,随着最新的应用更新,您至少可以在 Android Google Sheets 应用中看到绘图,但“分配的脚本”(即从桌面版的脚本编辑器分配)似乎没有触发。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 2012-06-01
      • 2011-02-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多