Is there a way to force a download link instead of the browser trying to open the file? In this case I have a docs spreadsheet and a some links to mp3 files. I want the users to download these files instead of the browser playing it. The mp3's are hosted on another site. Thanks, Bo
To make download links for documents - https://docs.google.com/feeds/download/documents/Export?docID=yourDocId
To make download links for any file - https://docs.google.com/uc?id=yourDocId&export=download&hl=en_US
To make download links for spreadsheets - https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=yourDocId&exportFormat=csv
For further information please go here
UPDATING IN 2018
The new download URL is
https://docs.google.com/spreadsheets/d/<KEY>/export?gid=<GID>&format=csv
where <KEY>
and <GID>
can be obtained from your navigation's URL,
https://docs.google.com/spreadsheets/d/<KEY>/edit#gid=<GID>
PS: spreadsheets (workbook) may have multiple sheets (worksheets), GID is the desired sheet ID. One-sheet-spreadsheet usually has gid=0
, but if you add more they'll have random numbers (the GID is preserved even changing tab-order).
So, using wget
or curl
you can test,
wget --no-check-certificate -O test.csv \
'https://docs.google.com/spreadsheets/d/0At2sqNEgxTf3dEt5SXBTemZZM1gzQy1vLVFNRnludHc/export?gid=0&format=csv'
To expand on Mokarom's answer (because I can't comment) you need to replace the part of those links that say "yourDocId" with the document id of the page you're trying to download. This is the key= part of the url.
For example, if you had a spreadsheet at https://docs.google.com/spreadsheet/ccc?key=0AhjOs40Xk1-4dGg0MjMVYURPMFRpeUFhbmZBTkZ0dEE#gid=8, then you would go to https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=0AhjOs40Xk1-4dGg0MjMVYURPMFRpeUFhbmZBTkZ0dEE&exportFormat=csv for the download link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With