Force download link on a google docs spreadsheet

前端 未结 3 629
旧巷少年郎
旧巷少年郎 2021-02-08 06:24

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

3条回答
  •  我在风中等你
    2021-02-08 06:44

    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.

提交回复
热议问题