Google-sheets – How to save a Google Sheets chart as an SVG or EPS

epsgoogle sheetsimages

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?

Best Answer

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!