jsp导出简单的excel

在jsp中加入以下代码即可

<%
String fileName = "导出excel.xls";
fileName = new String(fileName.getBytes("GBK"),"ISO8859_1");
response.setHeader("Content-Disposition",
"attachment;filename="+fileName);

response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
%>

上一篇:关于PDF.NET开发框架对Mysql Sqlite PostgreSQL数据库分页支持的个人看法


下一篇:在Xcode中想要清屏该怎么实现