【问题标题】:How to add "custom function help" to a google spreadsheet. - not the script editor如何将“自定义函数帮助”添加到谷歌电子表格。 - 不是脚本编辑器
【发布时间】:2013-02-07 13:13:30
【问题描述】:

可以将“自定义函数帮助”添加到 Google 电子表格吗? 即,如果我在电子表格单元格中输入 =sum,我会得到浮动帮助文本, 有没有办法用自定义函数做到这一点?

谷歌应用程序脚本中的文档是使用 JSDoc http://en.wikipedia.org/wiki/JSDoc 创建的 样式(类似 JavaDoc)cmets。 如此处所述 https://developers.google.com/apps-script/guide_libraries?hl=en#guidelines

看起来这些只在脚本编辑器中有效。它有一种添加文档的方法,因此它会出现在电子表格中。

【问题讨论】:

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


    【解决方案1】:

    此功能于 2014 年 5 月添加,之前的 Issue 2475 已关闭。

    examples given in Google's Documentation 没问题,但您可以使用 jsdoc 信息做的比它们显示的更多。

    例如:

    /**
     * Return the time that the referenced cell or range was last changed.
     * Initial use shows current time.
     *
     * @param {Sheet3!B32}  reference  Cell or range to monitor.
     * @returns                        The time the reference was last changed.
     * @customfunction
     */
    function lastModified( reference ) {
      // Surprise - we don't actually care what has changed!
      return( new Date() );
    }
    

    我在my blog 中提供了更多细节和示例。

    【讨论】:

    【解决方案2】:

    看到没有这方面的文档,我认为这个功能是不可能的。考虑looking for an existing request for this on the Issue Tracker,如果没有,请提出功能请求!我相信你不是唯一一个想看到这个的人。

    【讨论】:

    【解决方案3】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多