Embed a Spreadsheet into Google Docs

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 1.00 out of 5)
November 18, 2008

People love the online facility from Google, the Google Docs and so it is getting popular everyday. Suppose you conducted a brief study on the popularity of the some highly circulated magazines in your city. You write a report on that and create a pie-chart showing the basic data, or create presentation for your site with Google Docs. But when you are done with the chart, you are struck with a problem, “Now how to embed this spreadsheet on the report that I wrote on Google Docs?”. Well that is simple.

chart Create a new Spreadsheet in Google(spreadsheets.google.com). Just fill in the rows and columns as you would do in Microsoft Excel. Then select all the fields you just filled and then go to “Insert” menu and select “Chart”. Here you can select one of the types like bar chart, pie chart, lines etc and also customize their colors. You will also see a small preview at the bottom right corner and set labels to it. When you think your chart is fine, save it. Finally publish the chart.

After publishing you will get a link to the file which looks similar to this: pie


Copy this code. Then open up the document that you created with “Google Documents”. Go to Edit>Edit HTML. Now, insert the code given below to embed the spreadsheet into your google document replacing this URL of spreadsheet with that of yours.

<p style=”float: right; margin: 50px”>

<img src=”http://spreadsheets.google.com/pub?key=p-_oOZ_hqw05IjIY_yXBdPA&oid=3& output=image”/>


You can also embed this spreadsheet chart in any webpage.

You can also copy the chart as an image to embed your spreadsheet into Google Docs, but there is one downside to it. If you ever need to edit the chart, you will have to place that image again. But if you place the chart through code, you will never have problems like that. The changes will automatically be seen.

So you can easily embed your spreadsheets into Google Documents with this trick. But this would be a bit difficult to do via Google Spreadsheets for mobile.

You may also like...

  • Can the code be placed as a widget inside a blog?

  • ladzsunico

    So it’s all about the code. Wow! That’s nice to know.

  • admin

    No not just about the code. Google Docs is much like the Microsoft Office and when it comes to sharing, it is much powerful.

  • iT a good docs

  • Search Engine Marketing – Dallas

    Glad I found this tidbit on bing when I was perusing the internet. Good STUFF!

  • Zajac Tom

    well you can insert a chart but not spreadsheet, let say that I have more data in the spreadsheet that is nice calculated and I would like this part just insert into google docs, and here where problem starts, since you can;t do this i google docs, simple copy and past from spreadseet to docs will copy and paste only text without formating or even keeping data organize in the table, just simply will stick all numbers and letters together so it is imposible to understand what is it…
    this is major withdraw when comes to google docs, simple editing is ok but a little more then that and google docs looks like archaic useless text editor…

  • Anonymous

    yes there sure are some limitations to every software. Google Docs is
    improving everyday though.

  • Zajac Tom

    of course every software has some limitation, however this problem of not being able to paste fragment of the spreadsheet or chart or something else its quite not OK especially when we talk about giant like Google, certainly they have resources and money to fix the most common and wanted features. It is interesting however, that you can embed or insert almost everything to website that is build by using Google sites? but it is not possible in Google docs? in another hand, looks like Google is removing from time to time features that where maybe not brilliant but some how very useful like for example capability of editing html code right in Google docs, and which functionality is missing, or offline copy of the file, sync with your docs on pc etc.
    True, that Google docs also like entire Google Aps are improving and you can see more features but those are related more to collaboration rather then edition, but still features like this with inserting spreadsheet is not solved or improved for very very long time.
    I like Google very much and use many of the services that are Google made, however some simple features that are most wanted should be addressed quite soon and lack of such improvements are setting back the usability of Google docs as replacement for MS Office or OpenOffic, and in my opinion can’t be advertise as a online replacement of the office suite, instead it should have a name like online collaborative wordpad like text editor…
    Not mentioned, that features – that many users are waiting for – are available after messing up with code, by simply adding and running code trough api or something but honestly how many people are able to do such coding so they can extend the usability of the Google docs?

  • Bishal Adhikary

    yes, but with slight modifications

  • This is really a extremely beneficial read for me, Have to admit you might be 1 in the most effective blogger I ever saw.Thanks for posting this informative article.

  • David Gaian

    Any better way to do this now, three years later????