【问题标题】:Custom Function in Google Sheets Add-OnGoogle 表格插件中的自定义功能
【发布时间】:2014-11-15 10:29:04
【问题描述】:

我正在尝试为 Google 表格创建一个自定义函数作为插件。

在我的电子表格中一切正常,我也可以通过 Web chrome 商店下载它 使用 Google 提供给我的链接。

我唯一的问题是无法通过 Google 表格插件商店使自定义功能工作。

不知道我是否需要在manifest.json 文件中添加更多信息,或者执行其他操作。

我的应用程序已注册,它与外部服务没有连接,它只使用常用的 javascript 函数来拆分字符串对象。

代码结构如下:

function onOpen(e) {
  SpreadsheetApp.getUi().createAddonMenu()
      .addItem('Start', 'use')
      .addToUi();
}

/**
* Enables the add-on on for the current spreadsheet (simply by running) and
* shows a popup informing the user of the new functions that are available.
*/
function use() {
var title = "Example";
var message = "The Function GETID is now available in this spreadsheet";
var ui = SpreadsheetApp.getUi();
ui.alert(title, message, ui.ButtonSet.OK);
}

function onInstall(e) {
    onOpen(e);
}

/**
* example
* @param {string} input the example URL.
* @return The example URL.
* @customfunction
*/
function GETID(URL) {
    return 'example '+URL;
}

【问题讨论】:

    标签: javascript google-apps-script google-sheets add-on chrome-web-store


    【解决方案1】:

    发布 Google 插件与发布 Chrome 网上应用店扩展程序的过程不同。附加组件也仅在开发人员预览中。这不会阻止您发布插件,但这意味着它首先必须得到 Google 的批准。此page contains a form for submitting your add-on for approval 以及有关发布过程的其他信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-05
      • 2020-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多