Trigger Google Apps Script in Spreedsheet from context menu
问题 I have Google Apps Script in Spreedsheet that works on currently selected row. To run it I have to select this script from script manager. Is it possible to add this script to the context menu or bind to some shourtcut ? 回答1: You can create a menu with button that will run the script that you want using the onOpen function. See the Apps Script documentation. function onOpen() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); var entries = [{ name : "Read Data", functionName : "readRows" }]