Recall & Review
beginner
What is a custom menu in Google Sheets?
A custom menu is a special menu you add to the Google Sheets toolbar. It lets you run your own scripts easily without opening the script editor.
Click to reveal answer
beginner
Which Google Apps Script function is used to add a custom menu when the spreadsheet opens?
The
onOpen() function runs automatically when you open the sheet. Inside it, you add your custom menu using SpreadsheetApp.getUi().createMenu().Click to reveal answer
beginner
How do you add an item to a custom menu in Google Sheets?
Use the
addItem(name, functionName) method on the menu object. The name is what shows in the menu, and functionName is the script function it runs.Click to reveal answer
beginner
Why do you need to save and reload the spreadsheet after adding a custom menu script?
Because the
onOpen() function runs only when the sheet opens. Reloading triggers it to add your new custom menu to the toolbar.Click to reveal answer
beginner
What is the purpose of the
SpreadsheetApp.getUi() method in creating custom menus?It gets the user interface object for the spreadsheet. This object lets you create menus, dialogs, and sidebars to interact with users.
Click to reveal answer
Which function automatically runs when you open a Google Sheet to add a custom menu?
✗ Incorrect
The onOpen() function runs automatically when the spreadsheet opens and is used to add custom menus.
What method do you use to create a new custom menu in Google Sheets?
✗ Incorrect
You use SpreadsheetApp.getUi().createMenu() to create a new custom menu.
How do you add an item that runs a script function to your custom menu?
✗ Incorrect
The addItem() method adds a menu item that runs the specified function.
After writing the script to add a custom menu, what must you do to see it in your Google Sheet?
✗ Incorrect
You must reload the spreadsheet to trigger onOpen() and see the custom menu.
What does SpreadsheetApp.getUi() return?
✗ Incorrect
SpreadsheetApp.getUi() returns the user interface object to create menus and dialogs.
Explain how to create and add a custom menu in Google Sheets using Apps Script.
Think about what happens when the sheet opens and how you add menu items.
You got /6 concepts.
Why is the onOpen() function important for custom menus in Google Sheets?
Consider when your menu needs to be visible to users.
You got /3 concepts.