【问题标题】:Unable to download xlsx file using Internet Explorer 8 XP Machine无法使用 Internet Explorer 8 XP 机器下载 xlsx 文件
【发布时间】:2015-06-03 02:26:20
【问题描述】:

我正在开发一个 Java Flex Web 应用程序。这里我需要从服务器路径下载处理后的xlsx文件。 所以我们使用了下面的 as3 代码:

navigateToURL(URLRequest,"_blank");

以下网址在浏览器中打开: http://abcd.com/ple/data/xxxxxx/19/reports/sanple.xlsx

当我在 Internet Explorer 中打开浏览器时,它会被下载为 .zip 文件。

如果我打开 Zip 文件,我会看到一些不相关的文件,如下所示。

无论如何,在 Firefox 和 Chrome 浏览器中使用相同的 URL,xlsx 文件可以正确下载,没有任何问题。为什么仅 IE 资源管理器将 xlsx 文件下载为 zip 文件。谁能帮我按原样下载 xlsx 文件。

提前致谢。

【问题讨论】:

  • 直接IE打开URL(在IE中手动输入地址)时IE的行为是什么?
  • IE8 显示的行为与上面的屏幕截图中提到的相同。IE9 正在推送一些未格式化的字符和符号。
  • 关于这个问题的任何想法..?

标签: excel actionscript-3 internet-explorer actionscript xlsx


【解决方案1】:

我遇到了同样的问题,根本原因是 IIS 没有定义最新的 MIME 类型。我们的旧 IntrAnet 运行的是 Windows Server 2003,我们将 MS-Office 升级到了 2010 版(使用 DOCX、XLSX 格式)。

我将 MIME 类型从我的 2014 Web 服务器复制到我的 2003 服务器,重新启动 IIS,现在一切正常。

以下是我添加的新 MIME 类型(应用后记得重启 IIS):

.docx  application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx  application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potx  application/vnd.openxmlformats-officedocument.presentationml.template
.ppsx  application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptx  application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlsb  application/vnd.openxmlformats-officedocument.spreadsheetml.template
.xlsx  application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-10
    • 1970-01-01
    • 2016-04-29
    相关资源
    最近更新 更多