When you open the script editor from a Google Sheets spreadsheet, you're editing what is called a bound script. ? A custom menu can only be created by a bound script
How to create a custom menu in Google Sheets using Google Apps Script?Ĭreating a custom menu is very easy to do and only requires a few lines of code.įirst, create a new Google Sheets spreadsheet or open an existing one where you want to create the custom menu. Note: Custom Functions cannot use functionality that requires user authorization but this restriction does not apply to functions associated with menu items in a Custom Menu. You can link to functions that require the user's authorization from a menu item and users will be asked to approve the necessary permissions when they select that menu item. Instead of opening the script editor and running a function, the user can run it from the spreadsheet itself by selecting the menu item that is associated with the function.Įven non-technical users that may not be comfortable navigating the script editor will be able to easily navigate a menu. You can make it easy for users to run Google Apps Script functions that are associated with your spreadsheet. There are several use cases for creating a custom menu. When should you create a custom menu in a Google Sheets spreadsheet? I've also written a series of articles to teach you how to code using Google Sheets and Apps Script. If you've never worked with Apps Script before, I've written an article that explains how to create and run your first apps script.