Search code examples
google-apps-scriptgoogle-sheetscustom-function

Share a custom google sheet function with another email address without showing the source code


Iv'e written a custom google sheet function using Google Apps Script, and i would like to share it with another spreadsheet user, but i do not want to share the functions source code.

I've converted the Google Apps Script to a project, but now i have no idea how to link the project back to my sheet, so the function will work again.

I also do not want to publish the AddIn to the marketplace.

Test As Addin also doesn't work, the sheet is opened in a new tab, but the cells with the custom function says #NAME?.

What am i missing?


Solution

  • Explanation / issues:

    • The error #NAME? indicates that you are trying to use a function that does not exist. As you also mentioned, this function does not belong to the active spreadsheet but on a different project.

    • Unfortunately, it is not possible to share a custom function with other spreadsheets directly.

    Possible Workarounds:

    • You can create an add-on.
    • Another workaround solution would be to create a library. That is a great alternative and the documentation is quite straightforward.

    Related: