Skip to main content

C'est la Z

Google Sheets

I make regular use of Google's office suite. I use Google forms all the time to collect data, Google docs when I have to leave Emacs for document preparation - usually when I have to collaborate with others online and I use Google Sheets as my greadebook.

I don't do a lot of data processing using Google sheets. For that I download the data and write small scripts. On the other hand it turns out that you can do some pretty nifty things by scripting right in Google sheets.

Google sheets can be scripted using Javascript and Google's APIs. For example, adding "hello" and "world" to the two bottom leftmost cells in your active spreadsheet can be done by running a function like this:

In general, it's pretty easy to grab, modify, or otherwise manipulate cells from a spreadsheet with simple javascript.

You can also send email from a Google app script. For me this was a big win. I use it for emailing grades to students and also as a poor man's mailmerge. The key call is:

Here's a video walking through sending emails to a list of people from a spreadsheet. The code is underneath.

comments powered by Disqus