Tuesday, October 02, 2012

Google Apps Script Web App with Spreadsheet

Google Apps Script is a fascinating technology for putting together web applications using the Google Apps environment as the infrastructure. Here is a quick example of a public web application that sets 10 cells in a Google Apps spreadsheet to a value.


Note: Logger class does not work in an event handler.

I used the GUI Builder to create the simple interface:


Just make sure you set the parameter to be passed in the event handler. See the following stackoverflow item for more detail:



Like magic you have a web application. To see it in action go to the following public URL:


And you can see the spreadsheet that is modified by this script at the following public URL:


For some fun, open the app in one tab and open the spreadsheet in a separate window. You can modify the value in the application tab and watch the cells change in the spreadsheet. This is a view-only spreadsheet, but it is being modified by the web application.

Next up is writing a script to pull info from Google Analytics since I need to do some combining of statistics from there regularly for work.

No comments: