2012-09-25 16 views
0

我在Mozilla中打开excel文件时出现错误。它在IE中正常工作。我有以下代码:在Mozilla中下载excel时出现错误

String file="abc.xls"; 
      response.setHeader("Content-disposition:", "attachment; filename="+file); 
      response.setContentType("application/vnd.ms-excel"); 
      response.setCharacterEncoding("UTF-8"); 

请建议如何解决此问题。

请帮忙。

+3

什么错误? –

+0

而不是获取弹出窗口来打开或保存文件,页面打开时髦的字符。 – user179516

回答

0

您需要更新您的Firefox配置文件并编辑“插件MIME类型”信息才能处理此类文件。

检查这些页面:

http://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

http://support.mozilla.org/en-US/kb/set-how-firefox-handles-different-file-types

+0

但我不能告诉用户更改配置文件设置,如果他们在Firefox中打开它。这需要通过代码来处理。 – user179516

+0

任何建议 – user179516

+0

尝试将MIME类型从“application/vnd.ms-excel”更改为“application/x-excel”或“application/excel” – JuanZe

相关问题