设置下头 response.addHeader("Content-Disposition", "attachment;filename="+ new String(filename.getBytes())); OutputStream os= new BufferedOutputStream(response.getOutputStream()); response.setContentType("application/vnd.ms-excel;charset=gb2312"); os.write(buffer); os.flush(); os.close();
[quote=引用 2 楼 jxxzyyzy 的回复:] 设置下头 response.addHeader("Content-Disposition", "attachment;filename="+ new String(filename.getBytes())); OutputStream os= new BufferedOutputStream(response.getOutputStream()); response.setContentType("application/vnd.ms-excel;charset=gb2312"); os.write(buffer); os.flush(); os.close();
81,092
社区成员
341,718
社区内容
加载中
试试用AI创作助手写篇文章吧