Saturday, March 10, 2007

HOW TO: Embed a spreadsheet in your blog (part 2)

The second part of a two part post... (with a characteristically un-prolific few days of non-posting in between)... This time, we embed a spreadsheet in this post which anyone with edit rights can edit. Most new viewers will see the spreadsheet below and say "wait a sec.. i can't edit this!" - and you're right. We don't offer a public "anyone can edit" option... but if you comment here and ask, I'll give you edit rights (at least for a little while)...

... [crickets]...

So - to embed an editable spreadsheet in a blog entry (or on a web page)...
1 - create a spreadsheet at docs.google.com
2 - make it the "right size" - meaning, delete unnecessary rows, columns and sheets so that what shows in your blog entry is a nice viewable block of cells
3 - Turn on "anyone can view" so at least all the folks you didn't invite can at least view the spreadsheet.
4 - Capture the URL of the spreadsheet (not the published URL, but the one on the collaboration tab) and copy it so you can paste it in the following step...
5 - embed the following code in your spreadsheet:
<iframe width='800' height='400' frameborder='0' src=''&chrome=false'></iframe>

[note: that spreadsheet URL should look something like this:
http://spreadsheets.google.com/ccc?key=sOme-ReaLly-lonG-NuMBer and then you really should put the &chrome=false on there to kill all the extraneous header stuff...]

6 - Post it! (assuming your blogging service lets you embed iFrames...like Blogger does)

Like i said - when you use this method - most of your viewers can't edit the spreadsheet, but you can invite those people who you know to be trustworthy collaborators...and tell others to requst an invitation if they're interested in what they see.

The only problem at the moment with dong this on a Blog Post is that some browsers put the focus on the spreadsheet object in the iFrame and jump down to that post... (which is why i don't have a sample sheet here anymore).
Try it... it may work well for your needs... I think it's pretty cool....
...[crickets]...