Posts

Popup message box

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') }

Create a button in google sheets

Select a cell in google sheet. Insert->Drawing. Insert a textbox. Add text to it and give it an outline. Save and close. Go to Tools->Script Editor. Create a new function, for instance: function hello() { } Click on the 3 dots at the top right hand corner of the textbox you have created. Click on assign script. Assign it the name of the function - hello.

How to start writing your script

You can either write a standalone script that has less functionality: Login to your gmail account. Go to:  https://script.google.com/home Click on 'new script'. Rename the project. Change the filename. OR an integrated script that has more functionality: Login to your gmail account. Go to your documents. Click on your google app (docs, sheet, powerpoint). Go to Tools --> Script Editor. Rename the project. Change the filename.