<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JamesMarquez.com &#187; Google</title>
	<atom:link href="http://www.jamesmarquez.com/category/google/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jamesmarquez.com</link>
	<description>filipino web applications developer and designer</description>
	<lastBuildDate>Sat, 29 May 2010 04:03:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Playing with Google Spreadsheet</title>
		<link>http://www.jamesmarquez.com/playing-with-google-spreadsheet.html</link>
		<comments>http://www.jamesmarquez.com/playing-with-google-spreadsheet.html#comments</comments>
		<pubDate>Wed, 13 Aug 2008 05:28:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.jamesmarquez.com/?p=13</guid>
		<description><![CDATA[There are a lots of tools on Google spreadsheet that we could use to display live data from a source website into your own website and it keeps get updated when the source is updated.
One good example I tried is getting the 2008 Beijing Olympics Overall Medal Standing, my goal is to have a list [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lots of tools on Google spreadsheet that we could use to display live data from a source website into your own website and it keeps get updated when the source is updated.</p>
<p>One good example I tried is getting the <strong>2008 Beijing Olympics Overall Medal Standing</strong>, my goal is to have a list of medal standing that is updated regularly.<br />
<span id="more-13"></span><br />
The source data is from http://en.beijing2008.cn/ <a href="http://results.beijing2008.cn/WRM/ENG/INF/GL/95A/GL0000000.shtml" rel="nofollow" target="_blank">medal standing page</a></p>
<p><strong>Getting the data</strong><br />
Open up blank/new sheet on your google docs, and on the first cell put this <code>=ImportHtml("http://results.beijing2008.cn/WRM/ENG/INF/GL/95A/GL0000000.shtml", "table",2)</code>. </p>
<p>ImportHtml is a Google function that retrieves info from an HTML file. The first parameter  is the URL of source data, the second parameter indicate that we are going to get a table format, and the last parameter is the index of the query format, in our case the 2nd table from the source html.</p>
<p><strong>Formating the data</strong><br />
In some cases, the result doesn&#8217;t replicate the exact column of the source table most, especially those with colspan that could be the merged cells in spreadsheet, so we are going format it to our own liking and in my case I only want to output the list of countries with their rankings, total golds, silvers, bronze, and their overall total medals. Some regular spreadsheet functions will do the job for formatting.</p>
<p><strong>Generating codes to embed</strong><br />
After formatting, publish the sheet by going to &#8220;Publish&#8221; tab. Check the &#8220;Automatically re-publish when changes are made&#8221; so it will always updated when the source data gets updated. Click &#8220;More publishing options&#8221; this will pop up a new window, and from there select &#8220;HTML to embed in a webpage&#8221; from the File format option, then click on Generate URL button to generate the html code we need.</p>
<p><strong>The Result:</strong><br />
<iframe width='500' height='1000' frameborder='0' src='http://spreadsheets.google.com/pub?key=pRRLUKiz7TCvUvfXXMZDCcA&#038;output=html&#038;gid=1&#038;single=true&#038;range=A1:F100'></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamesmarquez.com/playing-with-google-spreadsheet.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
