Wednesday, March 12, 2014

How to create an Add-on menu in the new Spreadsheets

This is in the documentation here, but I thought I would add it in here to highlight how to create an Add-on menu in the new sheets script since I couldn't find the method documentation in the regular developer side and it didn't automatically come up in the scripting environment.

var ssAddOnMenu = SpreadsheetApp.getUi().createAddonMenu()
                       .addItem('Populate Step By Step Solution Cells','getStepByStepSolution')
                       .addItem('Create Individualized Quizzes','numberOfProblemsUi')
                       .addItem('Send Students the URL of the Quiz by Email', 'sendEmailsContainingQuizURL')
                       .addItem('Pull Most Recent Student Response from Quiz, Grade them, and Send and Email if wanted', 'sendEmailsWithPullResponsesUi')
                       .addToUi();