Google Apps Script 50 Exercises Explained Vol 2

1) Custom menu in Google Sheets Does: Adds a menu item so users can click to run functions.How it works: onOpen() runs automatically when the file opens (for editors), and SpreadsheetApp.getUi() adds UI. function onOpen() { SpreadsheetApp.getUi() .createMenu(‘Tools’) .addItem(‘Say Hello’, ‘sayHello’) .addToUi(); } function sayHello() { SpreadsheetApp.getUi().alert(‘Hello from Apps Script!’); } 2) Show a toast ...