I have an Excel spreadsheet (.xls) that I want to allow users to download it from my web page. Perhaps the “download” button on the page, and when users click on it, the file will be downloaded.
May I know how to do this? Snippets of code and links will be appreciated.
You can use simple html links:
link
<a href='/path/to/excel/file.xls' target="_blank">Download</a>
button
<form> <input type="button" value="Download" onClick="window.location.href='/path/to/excel/file.xls'"> </form>
How to just link to a file through a binding?
<a href="path-to-file.xls">Download</a>
I think this should be good too:
<a href="path-to-file" download="abc.xls">Download</a>
download: file name to download as.
Source: https://habr.com/ru/post/1389580/More articles:C # Delegates, Events, and Lambda Expr for New Students - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1389576/proper-css-to-style-nested-element&usg=ALkJrhhZiDiE_uXB7IBhTv-Z6lMjj9Ce7QWhy doesn't the term evaluate a function that takes 0 arguments? - c ++How can I define a method that takes an ordered array [T] in Scala? - genericsgit forking and fixing - can you explain the theory of this cryptic (to me) behavior? - gitJQuery user interface is used for sorting without sorting, just move - jqueryError updating item count on Amazon using API - c #Cannot use CURL in GROOVY script to call REST PUT - restHow to change MAC address with batch file in Windows 7? - windowsHow to make an application become a system application? - androidAll Articles