7

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"?

Blue Sheep
  • 442
  • 7
  • 16

1 Answers1

11

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)

ozeebee
  • 1,878
  • 2
  • 23
  • 26
  • @Tessaracter It works fine, I just tested it. The URL above is just an example, replace the document ID by yours (and obviously you must have access to it). – ozeebee Apr 01 '20 at 13:14
  • 2
    No, it does not. I tried on [this](https://docs.google.com/spreadsheets/d/e/2PACX-1vSc_2y5N0I67wDU38DjDh35IZSIS30rQf7_NYZhtYYGU1jJYT6_kDx4YpF-qw0LSlGsBYP8pqM_a1Pd/pubhtml#). But [this](https://www.reddit.com/r/googlesheets/comments/aymwjd/how_do_you_select_csv_output_for_individual/) solution works - https://www.reddit.com/r/googlesheets/comments/aymwjd/how_do_you_select_csv_output_for_individual/ – Trect Apr 01 '20 at 14:15
  • @Tessaracter can you share the URL that finally worked for you, I want to download the same sheet – skv Apr 01 '20 at 18:21
  • In your case, you can have a look at this question: https://stackoverflow.com/questions/21189665/new-google-spreadsheets-publish-limitation – ozeebee Apr 03 '20 at 09:50