Join Scott Simpson for an in-depth discussion in this video Building dialogs and sidebars, part of Up and Running with Google Apps Script.
- There are a few more ways of providing interactivity…within containers like docs, sheets, and forms.…Dialogs and sidebars allow for more styling…and other flexibility, because they make use…of the HTML service to render HTML,…instead of only pre-styled elements.…I'll go into my script,…and I'll add another menu item for this.…I'll give it a name, and I'll call a function.…And then, I'll set up that function.…
If we're going to use some HTML,…we ought to have some, right?…There are two ways to do this.…You can either specify the HTML directly…as a string into your script,…or you can reference an outside file.…I'll take the path of using an outside file…to show you how that works.…I'll set a variable called HTML, and I'll set it equal…to HtmlService.createHtmlOutputFromFile.…If you wanted to use the string,…you could just use this one up here.…And I'll set the name of the file to Page.…
Next, I need to set the sandbox mode,…which is an enum, and I'll write…HtmlService.SandboxMode.IFRAME,…which is by far the most common.…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app
Skill Level Beginner
Q: The OpenWeatherMap API is not working, or the call returns a 404. What do I do?
<div>A: OpenWeatherMap now requires you to use a free API key (or APPID) when requesting information. You'll need to register for a free key at <a target="_blank" href="http://home.openweathermap.org/users/sign_up">http://home.openweathermap.org/users/sign_up</a> and then add the APPID parameter and your key to the end of the request URL.</div><div> </div><div>So, your request string "api.openweathermap.org/data/2.5/weather?zip=94040,us" would become "api.openweathermap.org/data/2.5/weather?zip=94040,us&appid=abc123abc123" (using your APPID/API key).</div><div> </div>