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
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/
where
and
can be obtained from your navigation's URL,
https://docs.google.com/spreadsheets/d/
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'