I have a CSV file thats been hyperlinked. When the user clicks it, its supposed to open in a XLS file but for some reason its opening in HTML page..How can I fix it?
The python bottle application runs on apache webserver.
<a id="d14" href="../files/BUY_PRODUCT_LIST.csv">PRODUCT_LIST.csv</a><br>
You're confusing a Microsoft Excel spreadsheet, .xls
with a comma separated value file, .csv
.
csv
is just a text file in which tabular data is delimited by a comma (or a tab, a dot, a semicolon, etc). Your browser can handle this file type as a text file and will display it as such.
You will have to modify the HTTP header and change the Content-Type
to something more fitting.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加