Formatting and filtering a Google Spreadsheet using Google Visualization API

Previously posted on Postach.io

Quick blog post from the iPad where I have extended the functionality of the spreadsheet I created earlier. I found it very easy to complete all the functions on the iPad **except for the spreadsheet formatting function** (how do you reduce the number of decimal places for a number column on the iPad?). I used [Textastic](http://www.textasticapp.com) to edit the HTML, [GDrive](https://itunes.apple.com/gb/app/gdrive-for-google-drive/id531569865?mt=8) to upload the file (the Google Drive app crashed a lot) and the full desktop view of Google Drive within Chrome to get the necessary URL for the image file.

My first aim was to get the URL to become a hyperlink. I found a [blog post](http://www.webopius.com/content/706/google-visualization-api-html-links-in-table-cells) which quickly helped solve this issue.

Next I wanted to turn the hyperlink into a button which opened the URL in a new window. The CONCATENATE function in Google Sheets helped here.

Then I wanted to hide the preURL column from the view. This took a little while because I forgot I was dealing with a spreadsheet and used the column headers as field names!

Finally I build a simple filter which allowed me to limit the results displayed to the user.

I’m now ready to design and populate a single spreadsheet containing all the training material – YouTube videos, webinars, iTunesU courses, articles, blog posts and files – which will be automatically limited depending on which page the user visits (beginner, intermediate or advanced). This should reduce the time it currently takes to manually edit the HTML in Google Sites.

Does anyone else use Google Sites within their educational establishment to help deliver staff training or CPD? I’d love to hear from you.

Querying a Google Spreadsheet with Google Visualization API

Previously posted on Postach.io

I’m adding to my school training website and want a quick and easy way of categorising the training materials available. I wanted to create a relational database and query it in some way but, to the best of my knowledge, Google Sites doesn’t allow this. I’m tied to Google Sites because the school are using Google Apps for Education and I actually like the security features it offers in keeping the web content restricted to those with school email addresses only.

Yesterday I found a website that suggested a way that I could [display a Google Spreadsheet via the Google Visualization API](http://acrl.ala.org/techconnect/?p=4001). A few hours later I was able to recreate the examples where dataTables were created within the Javascript however I could not find a decent **complete** example that showed how to link to an existing spreadsheet.

Searching through the forums it became apparent that this method did not work in Google Sites – even when embedded in an HTML box – the problem being that you can’t add the jsapi library in scripts. So I started again, using another domain to ensure that the code worked. It did after a little experimentation (and you can [grab the example here](https://dl.dropboxusercontent.com/u/42287593/GoogleSpreadsheet_Viz_template.html) if you are interested) where I removed the query and [encoded it into the URL](http://meyerweb.com/eric/tools/dencoder/) instead.

I then found that, if I saved the working HTML to Google Drive, I could [publish a folder as a website](https://developers.google.com/drive/web/publish-site). So I made the Google Drive folder public on the web and grabbed the googledrive.com link from the details pane. From there I found the file I wanted (imaginatively titled test2.html!) and embedded it in my Google Site using iFrame.

It worked!!

But so much effort to combine three Google technologies!!