Excel xlsx文件下载为zip文件

时间:2014-06-04 16:42:41

标签: excel apache .htaccess internet-explorer-8 zip

IE8中发生以下情况。服务器是Ubuntu上的Apache2。

我正在尝试通过链接下载excel文件。当我单击链接时,文件显示扩展名为.zip。

我在.htaccess文件中设置了mime-types,也可以看到它们在/etc/mime.type文件中。

.htaccess文件如下:

AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

我看了很多论坛,有人说第一行的.docm的前导点应该加上其他说不。 Apache文档说它可以包括不包括前导点。我试过两个。

我已将代码复制到文本编辑器中,以确保没有隐藏的字符并将其粘贴回来。 我在每次更改后清除了浏览器缓存并重新启动了Apache。似乎没什么用。 这确实在我们的旧服务器上工作,所以我确信问题是服务器配置。

任何帮助都将不胜感激。

0 个答案:

没有答案
相关问题