可以将“自定义功能帮助”添加到谷歌电子表格吗?
即如果我在电子表格单元格中输入 =sum,我会得到 float 帮助文本,
有没有办法用自定义函数来做到这一点?
谷歌应用程序脚本中的文档是使用 JSDoc 创建的 http://en.wikipedia.org/wiki/JSDoc
样式(JavaDoc 之类的)注释。
如此处所述
https://developers.google.com/apps-script/guide_libraries?hl=en#guidelines
看起来这些只能在脚本编辑器中工作。它有一种添加文档的方法,因此它会出现在电子表格中。
最佳答案
此功能于 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 中详细介绍了这一点和示例。 .
关于google-apps-script - 如何将 "custom function help"添加到谷歌电子表格。 - 不是脚本编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15015373/