Steve: Developing on the Edge - Google Spreadsheets: the REST client
Steve: Developing on the Edge
Thoughts on development, Web-services, technology and mountains.
16Nov
Fri2007
Google Spreadsheets: the REST client

One cute thing about google spreadsheets is its support for financial functions -near real time stock prices.

But it can retrieve something way better. Any HTTP GET request that returns XML or HTML that XPath can handle. You give the URL, the XPath, and let the spreadsheet fetch the file and parse the response.

Here is my first experiment. A spreadsheet that works out its IPAddress.

It uses DynDNS.org's Check IP service, which is then parsed.

All in one line of spreadsheet logic:

=importXML("http://checkip.dyndns.com/","/html/body")

That is lovely. Any well formed XML URL is now a data source for your spreadsheets. Now, remind me -are there some people who still think SOAP is going to survive as a mainstream technology?

[As an aside, we now know where gmail spreadsheets live. Today, it is 72.14.194.19, which is quite 125mS and 17 hops away from my house. The GETs are done at the far end of the AJAX channel]

Comments

On 19 November 2007 at 21: 49 Arun Batchu commented:
Steve, an excellent example of how elegant the REST paradigm is. Write once, leverage anywhere :)
Thanks for showing.