4

By default, Google Sheets only lets you save charts as PNGs. This isn't good enough when I need high-quality images, or images that are editable after export.

This quick tutorial1 provides guidance on pulling an SVG from Google Sheets using Chrome's Dev Tools:

  1. Go to the Google Spreadsheet page with the chart
  2. Open Developer Tools
  3. Click on the Magnifier Glass icon on the bottom-left of the page to "Select an element in the page"
  4. Click in the chart area.
  5. Look at the tree and find the beginning of svg description (e.g.
  6. Right click on the SVG line and select "Copy as HTML"
  7. Paste it to your favorite editor, and save as "MyChart.svg"

But this only half worked for me. It extracted the legend, axes, and chart labels, but omitted all chart content. Did I do something wrong here? Is there another way to extract Google Sheets charts as high quality images?

  • 1
    I just tried the referred instructions and worked fine for me on a very simple bar chart (two bars, one series). Create a demo spreadsheet, share it with anyone with the link for view only, add the link to the question and also add the code that you copied. – Rubén Oct 7 '16 at 21:34
  • I notice that my google sheets charts are canvas elements. – ptim Apr 22 at 12:22
1

It seems that you have to remove "clip-path" properties from your svg code.

For example, change:

 <g clip-path="url(https://docs.google.com/spreadsheets/d/12CllO5vsUKSajp-rl8dGZOUYB-zp75hjqSDu6N0dc4A/edit#_ABSTRACT_RENDERER_ID_1460)">

to

<g>

That made it for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.