Search code examples
spreadsheetgoogle-appsgoogle-apps-script

Google apps script for Spreadsheets: How to hide a helper function in Script manager?


I have customised a menu in Google Spreadsheet using Google Apps Script.

The problem I have is that all the helper functions I am using are listed when I press Script Manager.

I would like to hide them, I have read that if I put an underscore at the end of the function name, but it didn't work.

From documentation they say that the underscore at the end makes that the function is only callable from another function and not the editor, but as you can see in the image, it is not working for me: imagen con funciones


Solution

  • The underscore does nothing more than inhibit the function from showing in the Run from Script Editor dropdown.

    Running functions. Any function can be invoked directly from the Script Editor, except those with a name that ends with an underscore, which can only be called from other functions.

    You cannot hide code in the script editor.