jsp 导出excel
2024-08-29 17:06:55
设置头文件
<%
response.setHeader( "Pragma ", "public");
response.setHeader( "Cache-Control ", "must-revalidate, post-check=0, pre-check=0 ");
response.addHeader( "Cache-Control ", "public ");
response.addHeader("Content-Disposition", "attachment; filename=posStatistic_export.xls");
response.setContentType("application/vnd.ms-excel.numberformat:@;charset=UTF-8");
%>
如果还有乱码
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
最新文章
- An App ID with Identifier &#39;com.XXX.XXX’ is not available. Please enter a different string.报错
- spring第一课,beans配置(中)——自动装配
- SSH项目与SSM项目的进入首页的方法
- sublime text配置记录
- shell 中的>;文件重定向符 和 标准输入、输出、错误以及 2&;1 的含义*
- golang获取字符串长度需要注意的地方
- Unieap3.5-JS常用方法
- thinkphp中SQLSTATE[42S02]: Base table or view not found: 1146 Table错误解决方法
- POJ 3671 Dining Cows (DP,LIS, 暴力)
- Bootstrap 列偏移\列嵌套\列排序
- nginx subrequest演示示例程序
- Eclipse插件的各种安装方法
- await和async更多的理解
- JAVA中double类型运算结果异常的解决
- cookie和sesssion
- jQuery检查复选框是否被选
- php api 接口
- (转)python+opencv实现动态物体追踪
- pyextend库-unpack列表集合字符串解包函数
- Fast File System