Google Sheet Script to Create a Menu Item OnOpen - part of Stitching Sheets blog article
/**** | |
* This function runs automatically and adds a menu item to Google Sheets | |
****/ | |
function onOpen() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
sheet.setActiveSheet(sheet.getSheetByName("Events")); | |
var entries = [{ | |
name : "Export Events to MongoDB", | |
functionName : "exportEventsToMongoDB" | |
},{ | |
name: "Remove All Events from MongoDB (Delete Documents)", | |
functionName: "removeEventsFromMongoDB" | |
}]; | |
sheet.addMenu("Demo Stitch Sheets Integration", entries); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment