function functionToShowSideBar()
{ SpreadsheetApp.getUi().showSidebar(HtmlService.createHtmlOutputFromFile('NameOfHTMLFileCreated').setTitle("Hello"));
}
This bar will pop up at the right hand side of your sheets.
Code: Browser.msgBox("Hello!", Browser.Buttons.OK) Another popup message box is the toast, which shows up at the lower-right hand corner of the spreadsheet (this only works with sheets): SpreadsheetApp.getActiveSpreadsheet().toast("Hello", "This is the title"); If timeout seconds is set to -1, it means that the toast will be there forever. Create a modeless dialog that does not prevent you from doing other things: function showDialog() { var html = HtmlService.createHtmlOutputFromFile('hi'); SpreadsheetApp.getUi().showModelessDialog(html, 'This is the title') }
Code: function makeMenu() { DocumentApp.getUi().createMenu("Top Menu Text").addItem("Sub menu function is toastMe", "toastMe").addToUi(); } To make it load on startup, change function name to onOpen()
Comments
Post a Comment