- This GIST is outdated. I recommend a different approach here: https://gist.github.com/dhlavaty/9cb9f50aed62320329636e805e654eae
- Your Google SpreadSheet (Google Drive, Google Docs) document must be set to "Anyone with the link" can view it
- To get URL press SHARE (top right corner) on Google SpreeadSheet and copy "Link to share".
- Now add
&output=csv
parameter to this link - Your link will look like:
https://docs.google.com/spreadsheet/ccc?key=1234abcd1234abcd1234abcd1234abcd1234abcd1234&usp=sharing&output=csv
Still works in 2021
The old URL still works if you follow redirects. The new URL looks like this:
https://docs.google.com/spreadsheets/d/${my_key}/export?format=csv&usp=sharing
Demo (live, works)
Article
https://therootcompany.com/blog/how-to-download-a-csv-from-google-sheets/