.xlsx下载问题 [英] .xlsx downloading issue
问题描述
我已经在服务器上生成了.xlsx报告,并在页面上直接链接了这些报告.用户单击链接时,将下载报告文件,但文件扩展名将更改为.xls.因此,只有在更改扩展名之后,我才能正确打开文件.
IE中出现问题,Firefox正确下载文件,而Chrome保存名称为"File.xlsx.xls"的文件
I have generated .xlsx reports on server, and page with direct links to these reports.
When user clicks a link, report file is downloaded, but file extension is changed to .xls.
Therefore, I can't open file correctly, only after changing of extension.
Problem occurs in IE, Firefox correctly downloads file, and Chrome saves file with name "File.xlsx.xls"
什么会导致这种行为?任何帮助表示赞赏.
What can cause such behaviour? Any help appreciated.
推荐答案
.xlsx文件的mime类型"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"设置已解决的问题
Problem fixed with setting of mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" for .xlsx files
这篇关于.xlsx下载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!