在web.xml的
<welcome-file-list>上面增加:<!-- mime-mapping -->
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>

解决方案 »

  1.   

    IE可以嵌套excel的啊,按照你的操作,点击打开之后,excel是嵌套在 ie 中的,但有excel的所有功能那过。
      

  2.   

    response.setContentType("application/vnd.ms-excel")再加一行看看:
    response.setHeader("Content-Disposition","filename=test.xls");
      

  3.   

    同意 pigo(少壮且行英雄梦,迟暮归守温柔乡) 所说的,我以前也遇到过同样的问题,最后加一句response.setHeader("Content-Disposition","filename=test.xls");就可以了
      

  4.   

    楼上的方法是保存为EXCEL 再打开
      

  5.   

    to YuLimin(阿敏总司令:人,是要靠自己的!简单就是美!) 应该是:
      <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/msexcel</mime-type>
      </mime-mapping>
      

  6.   

    在web.xml中加入
    <mime-mapping>  <extension>xls</extension>  <mime-type>application/msexcel</mime-type> </mime-mapping>
      

  7.   

    无法直接打开是因为IE所在机器上的Excel是2003,如果是Excel2000默认是直接打开。
      

  8.   

    CONTENT_DISPOSITION = "Content-Disposition";
    CONTENT_DISPOSITION_VALUE = "inline; filename = \"" + filecaption + "\"";
    MIME_TYPE = "application/msexcel";