[Failed] Embedding live data from Google Spreadsheet with Apps Script ContentService in PowerPoint using oomfo

I came, I saw, I failed. This was a potentially promising hack that didn’t work out. Hopefully you’ll get as much benefit from failure, as from success.

Today I can across oomfo (from the same makers as FusionCharts):

oomfo is a plug-in for Microsoft PowerPoint that brings all the awesomeness of FusionCharts Suite XT to PowerPoint. Its wizard-based interface helps you create great-looking animated and interactive charts in minutes.

Using oomfo, you can create specialized charts like Waterfall, Pareto, Marimekko, Funnel and Pyramid, which PowerPoint forgot to add. Additionally, you can connect to live data sources like Excel, SalesForce, Google Docs and your own back-end systems

I was interested in the Google Docs integration but so far I can only find a Google Analytics connector. It was disappointing to discover that this relied on the user hosting a PHP file on their own webserver. Disappointment turned into shock when I then discovered to get even this to work required the user to pass unencrypted Google usernames and passwords in plaintext!

WTF unencrypted passwords

All the connector file is doing is formatting data from the Google Analytics API in an oomfo/FusionChart XML format. Below is an example for a single series bar chart:

oomfo xml

My thought was if I wrap data from a Google Spreadsheet around the Google Apps Script ContentService I could generate the required XML for oomfo to generate the chart in PowerPoint, no hosting of files, no passing of passwords.

Using my simple electronic voting system hack as a data source I was able to reuse this example on Stackoverflow on how to create a rss feed using class ContentService to create a template and code shown here. Deploying this code as a service/web app gives me a url I can query to get oomfo formatted xml. So if I want responses tagged ‘dev1’ I use:

https://script.google.com/macros/s/AKfycbw79D4L2nZ2chj9Q4bZxQPkd-nLNr1PFjyzdNHgSj_HSFGTkCc/exec?id=dev1 

Unfortunately when I try to use this as an external data source for oomfo I get ‘Unable to retrieve data from the specified URL’:

image

To check it’s not malformed xml I’ve downloaded the generated markup and uploaded to dropbox, which does work. So I’m not sure if oomfo is unable to follow query redirection or if Apps Script is preventing the data from being used by oomfo (if anyone has any suggestions, that would be great).

There you go. How you can’t embed live data from Google Spreadsheet with Apps Script ContentService in PowerPoint using oomfo.

6 thoughts on “[Failed] Embedding live data from Google Spreadsheet with Apps Script ContentService in PowerPoint using oomfo

    1. Post author

      hmm hadn't thought of that

      [Thanks to Bruce McPherson's investigations it looks like its an issue with cross-domain content being consumed in a Windows application. The solution looks like it would be solved if oomfo used ServerXMLHTTP]

      1. Hi Martin,

        This is Rahul, Tech Lead oomfo charts for PowerPoint.

        We have investigated this issue and found that its an issue with cross-domain as Google changes the domain name according to the geometric location and current version of oomfo uses XMLHTTP to fetch the data from the server, which does not support redirection, so the request made by oomfo was failing.
        In the latest version (yet to release) we have fixed this issue using ServerXMLHTTP instead of XMLHTTP and I hope you won't face this issue in the latest version.

  1. As per my understanding, ContentService works only with Google Site (not custom domain) or with another apps script gadget. You can not use it with third party domains or tools.

Comments are closed.