Pregunta

It is possible to add "custom function help" to a google spreadsheet? i.e. If I type =sum into a spreadsheet cell, I get floating help text, is there a way to do this with custom functions?

Documentation in google apps script is created using JSDoc http://en.wikipedia.org/wiki/JSDoc style (JavaDoc like) comments. as documented here https://developers.google.com/apps-script/guide_libraries?hl=en#guidelines

it looks like these only work in the script editor. It there a way of adding documentation so it appears on the spreadsheet.

¿Fue útil?

Solución

This capability was added in May 2014, and the previous Issue 2475 has been closed.

The examples given in Google's Documentation are OK, but you can do more with the jsdoc information than they show.

For example:

/**
 * 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() );
}

screenshot

I covered this with more detail and examples in my blog.

Otros consejos

Seeing that there is no documentation on this, I would assume that this functionality is not possible. Consider looking for an existing request for this on the Issue Tracker and if not, make a feature request! I'm sure you're not the only one who would like to see this.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top