Exporting Google Sheet's Line Chart as SVG file

104 views
Skip to first unread message

Sidhant Tumma

unread,
Aug 8, 2022, 3:27:22 PM8/8/22
to Google Apps Script Community
Hello, 

After creating a chart in Google Sheets, we get an option to download the chart as SVG file. I wanted to do this using Google Scripts. Is there a way to do this? 

I've tried using .getAs('svg') on EmbeddedChart. I'm getting error that says 'cannot convert from 'image/png' to 'svg'. I even tried 'application/pdf' (as it is mentioned in the doc that this works for the function getAs(contentType)) I get the same error for pdf too. Please help.

Tons of thanks. :) 
Reply all
Reply to author
Forward
0 new messages