Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download Public Google Spreadsheet as CSV?

I have a spreadsheet, ex.:

https://docs.google.com/spreadsheets/d/1_qVnTw1Cwb2Ziwta_N0p-V4_ptD6-ZypDvCIrnryNFU/pubhtml

that I want to download as a CSV file. To do this, I believe I must download it from a link similar to this:

https://spreadsheets.google.com/pub?hl=en&hl=en&key={INSERT KEY HERE}&output=csv

But my question is, how do I go about getting the "key"?

like image 603
Blue Sheep Avatar asked Aug 03 '14 12:08

Blue Sheep


1 Answers

Append the /export?format=csv just after the document id in the URL. So in your case, the URL should look like this:

https://docs.google.com/spreadsheets/d/1_qVnTw1Cwb2Ziwta_N0p-V4_ptD6-ZypDvCIrnryNF/export?format=csv

Of course, this must link to an existing sheet that is publicly shared (for viewing)

like image 105
ozeebee Avatar answered Oct 03 '22 03:10

ozeebee