POI导出excel文件时,怎么文件格式是.do格式的不是.xls格式??
POI导出excel文件时,怎么文件格式是.do格式的不是.xls格式??我设置的导出文件响应头部信息是这样的:response.setContentType("application/vnd.ms-excel"); 求解?? --------------------编程问答-------------------- getResponse().addHeader("Content-Disposition","attachment;filename=result.xls");少了这句话吧? --------------------编程问答--------------------
+1
--------------------编程问答-------------------- response.setContentType("application/octet-stream");
response.setContentType("application/OCTET-STREAM;charset=UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=result.xls");
这样就行了
补充:Java , Web 开发