This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Build a menu item | |
From https://developers.google.com/apps-script/guides/menus#menus_for_add-ons_in_google_docs_or_sheets | |
**/ | |
function onOpen(e) { | |
var menu = SpreadsheetApp.getUi().createMenu('Sort'); | |
if (e && e.authMode == ScriptApp.AuthMode.NONE) { | |
// Add a normal menu item (works in all authorization modes). | |
menu.addItem('Sort Sheet', 'sort'); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Menu set-up. From https://developers.google.com/apps-script/guides/menus#menus_for_add-ons_in_google_docs_or_sheets */ | |
function onOpen(e) { | |
var menu = SpreadsheetApp.getUi().createAddonMenu(); // Or DocumentApp. | |
if (e && e.authMode == ScriptApp.AuthMode.NONE) { | |
// Add a normal menu item (works in all authorization modes). | |
menu.addItem('Copy Values to Master', 'copySheetValues'); | |
} else { | |
// Add a menu item based on properties (doesn't work in AuthMode.NONE). | |
var properties = PropertiesService.getDocumentProperties(); | |
var workflowStarted = properties.getProperty('workflowStarted'); |
NewerOlder