Custom Functions with add-ons?

前端 未结 1 1993
野的像风
野的像风 2020-12-15 11:51

I\'ve been trying to create a Google Spreadsheet plugin from some existing Google App Scripts that I have, and one important part of this app script is Custom Functions.

相关标签:
1条回答
  • 2020-12-15 12:43

    Answer

    According to Eric Koleda in [Code.gs - date_add_and_subtract]( https://github.com/google/google-apps-script-samples/blob/master/date_add_and_subtract/Code.gs) to make available the custom fuctions in an add-on it's required to include at least one add-on menu, but this is not working at this time on testing mode.

    NOTE: The originally referred page was removed but the Date add and substract add-on sample code is available at https://github.com/googlesamples/apps-script/tree/master/sheets/dateAddAndSubtract.

    The "solution" to test a custom function add-on is to publish the add-on privately so you could avoid the Google review of an untested add-on. Related Q&A: Publish an add-on privately

    Remarks

    There are a couple of related GAS issues, please star them:

    • "Test as add-on" from standalone project to Google Sheets doesn't link custom functions
    • After activating an add-on, custom functions get stuck Loading... until spreadsheet refresh
    0 讨论(0)
提交回复
热议问题