excel文件生成后,路径指向它,放到要打开的地址栏内,如:
http://127.0.0.1:8080/Web/excel_doc/records.xls(其中一个)
文件已经正确生成,在IE中打开时能正常启动EXCEL,但有时EXCEL表格无任何数据,有时又显示正常
http://127.0.0.1:8080/Web/excel_doc/records.xls(其中一个)
文件已经正确生成,在IE中打开时能正常启动EXCEL,但有时EXCEL表格无任何数据,有时又显示正常
调试欢乐多
<mime-mapping>
<extension>xls</extension>
<mime-type>application/msexcel</mime-type>
</mime-mapping>
response.setContentType("Application/msexcel;charset=gb2312");
String strHeader = "attachment; filename=bjd.xls" ;
response.setHeader("Content-disposition",strHeader );
%>
<html>
<head>
<meta http-equiv="Content-Type" content="Application/msexcel; charset=gb2312">
<title>报价单编制</title>
</head>
就可以了