Thursday, August 26, 2010

Embedding Google Spreadsheet data into blog side bar

Frustrated with having to manually update my training data I spent more time than I would like to admit automating the process...

Step 1: Log in to your GoogleDoc Spreadsheet that you want to share. For my purposes I wanted to share only my totals so I created a new sheet and collated my overall training data to make it more visually appealing.


Step 2: Click the little down arrow beside the share button at the top right hand corner of the sheet and select "publish as a web page" from the drop down menu.

Step 3: Select the spread sheet that contains the data you want and click "Start publishing" Once that is done you should have a screen similar to the one shown in the picture above. Under the "Get a link to publish" header select "Webpage" , your sheets name, and the Cell range within the sheet that contains the data, in my case A1:C4.

Step 4: Highlight and copy the link that is generated, this will be used in the iframe parameters later.

Step 5: Log in to your blogger dashboard and access the design section of your blog.

Step 6: Click on the add gaget table in the location you would like to insert your spreadsheet. Select a "HTML/Javascript" gadget
Step 7: insert this HTML code with a '<' bracketing the iframe command on the first line (Note if this is added in bloggers composer it executes the framing command in the post hence why I have excluded it)...

iframe frameborder="0" marginwidth="0" marginheight="50" border="0" style="border:0;width:195px;height:108px;"
src="https://spreadsheets.google.com/pub?key=0ApUbbMKodwy1dHA5RjFyZFRxekN3a3VtN2NTcHFjMHc&hl=en_GB&single=true&gid=15&range=A1%3AC4&output=html"
scrolling="no" allowtransparency="true">

replacing the orange text with the html link you copied from your GoogleDoc spreadsheet. The red text can then be adjusted to fit the cells you desire. I would like to credit Viti-Vino. Le Blog de prac for this handy piece of html code.

EDIT 2012: Publish to web can now be accessed via the File menu

6 comments:

  1. Thought you might like that one :)

    ReplyDelete
  2. Can you make our "members personal bests" record an embedded google spreadsheet for us on the Tri Club blog? That way we can share it and have members update it themselves.

    ReplyDelete
  3. WOW! You've run less than me this year.

    ReplyDelete
  4. How is this a surprise? And really it's only a few less km

    ReplyDelete
  5. Thanks Scott! :) What a cool gadget!

    ReplyDelete