Join Scott Simpson for an in-depth discussion in this video Building custom functions, part of Up and Running with Google Apps Script.
- Let's switch gears now and start working with…container-bound scripts.…These, as you'll remember, are scripts that operate…within a particular container such as a document,…spreadsheet or form.…It's really handy to be able to add custom functions…to spreadsheets, so let's take a look at that.…I'll create a new spreadsheet…and I'll call it My other spreadsheet.…Now to get to the script editor within this container…I'll go to Tools, Script editor.…
There's a couple templates here on the left that…I encourage you to explore.…There's a Google Sheets Add-on template…and a Custom Functions in Sheets template…but for now, I'll just choose Blank Project.…A custom function can do pretty much anything you'd like…from adding a convenient conversion such as kilometers…to miles to any kind of custom logic…you need to have happen in your spreadsheet…and don't want to build into an expression…every time you use it.…So a custom function will take some inputs.…In this case I'll add a and b as inputs to this function.…
Then inside the function I'll do some kind of operation.…
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>