Monthly Archives: March 2014

Add-on Review: Vertex42 Template Gallery

Sometimes, when you want to produce a document to a standard format, it’s easier to let someone else do the hard work by using their purpose-designed template to do the job.

Vertex42’s Template Gallery provides over 100 templates, each suitable for either Google Docs or Sheets. Installation is straightforward using the Add-ons menu, and doesn’t require any external sign-up or account creation. After that you can browse the templates directly from the Add-ons menu:

...read more

Google Docs Page Setup

Google Docs gives you full control of where your text is located on the page. From the ruler at the top of your document you can adjust the margins, indents, and tabs.

Margins affect the whole document. Change them by dragging the edges of the grey band on either side of the ruler, or by selecting File > Page setup from the menu.

...read more

Your First Google Apps Script

Google Apps Script is a JavaScript-based scripting language that you can use to automate tasks in Google Docs, Sheets, and Forms. There’s no extra software to be installed, as there’s a code editor provided in Google Drive. Your completed scripts run on Google’s servers, rather than in your browser like regular JavaScript programs.

If you’re new to JavaScript, you might want to find a primer. Here’s a great one, which by sheer coincidence (ahem!) I happen to have written …

Apps Script is powerful – it can add sidebars and menus to Docs, add spreadsheets and new functions to Sheets, send email, and interact with other Google Apps and services such as Analytics, Calendar, Maps and more.

Today we’ll write the simplest of scripts – to convert Celsius temperatures to Fahrenheit – and we’ll write this as a custom function to call within a cell of a spreadsheet created in Google Sheets.

Make a new spreadsheet and fill in the following few cells:

From within your spreadsheet, use Tools > Script editor to open the editor. If you are presented with a dialog, click on Blank Project.

In the code editor, enter the following code:

/**
 * A custom function that converts Celsius to Fahrenheit.
 *
 * @param {Number} c = the temp in C.
 * @return {Number} = the temp in F.
 */
function tempConvertCtoF(c) {
   if (typeof c != 'number') {
      return null;
   }
   return (c * 1.8) + 32;
}

...read more