<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.net.URLEncoder"%>
<%@ include file="../include/commons-include.jsp" %>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<%
String filename = "账户合计.xls";
filename =URLEncoder.encode(filename,"UTF-8");
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="+filename);
response.setContentType("application/vnd.ms-excel.numberformat:@;charset=UTF-8");
%>
<html>
<head>
<style>
table {
border: thin solid #333;
border-collapse: collapse;
border-spacing: 0px;
}

th {
background-color: #ccc;
border: thin solid #333;
}

td {
border: thin solid #000;
}
</style>
</head>
<body>
<table cellpadding="1" cellspacing="1" align="center" class="global_tableresult" style="width: 100%;vnd.ms-excel.numberformat:@">
<tr>
<th nowrap="true">交易时间</th>
<th nowrap="true">业务编码</th>
<th nowrap="true">系统来源</th>
<th nowrap="true">资金标识</th>
<th nowrap="true">交易金额</th>
<th nowrap="true">账号编码数量</th>
</tr>
<c:forEach items="${lst }" var="ard">
<tr align="center">
<td><fmt:formatDate value="${ard.transTime }" pattern="yyyy-MM-dd"/></td>
<td><dict:write dictTypeCode="account.BussinessCode" dictKey="${ard.bussinessCode }" /></td>
<td>${ard.systemCode }</td>
<td><dict:write dictTypeCode="account.FundSymbol" dictKey="${ard.symbol }" /></td>
<td><fmt:formatNumber value="${ard.transAmount }" pattern="#.##"/></td>
<td>${ard.code }</td>
</tr>
</c:forEach>
</table>
</body>
</html>

jsp导出的更多相关文章

  1. JSP导出Excel后身份证后三位为0

    JSP导出Excel身份证号码超出Excel最大限制,用科学计数法表示,但后三位为0,修改方式: <style type="text/css">.txt    {    ...

  2. jsp导出Excel功能的实现

    借助POI的excel接口,可以方便得实现excel导出功能: 首先需要引入poi对应的jar包 1.前端jsp页面需要一个a链接. web页面文件MIM类型的下载,只需要一个a元素,该a可以链到该文 ...

  3. jsp导出excel

    很多时候,我们都知道在java项目里面采用poi来导出excel很方便,但是如果你的项目采用的是jsp你可以用更简单的方法来导出.首先你要在顶部引入:<jsp:directive.page im ...

  4. jsp导出简单的excel

    在jsp中加入以下代码即可 <% String fileName = "导出excel.xls"; fileName = new String(fileName.getByt ...

  5. jsp导出到Excel

    jsp模板文件 <%@ page isELIgnored="false" contentType="application/x-msdownload; charse ...

  6. JSP 导出Excel表格

    ES6语法 传入一个table的id,然后在导出excel按钮上加入一个<a href="#" id="buttonId">导出Excel</ ...

  7. java、jsp导出excel功能备份

    问题踩坑: ajax请求不能下载文件 必须这样: <a href="/media">点击下载Excel</a> 或者 location.href = '/m ...

  8. JSP导出Excel文件

    和普通的查询数据差别是没有分页,response设置一下就是到处功能. window.location.href="${_base}/promoteConsume/exportExcel?& ...

  9. html/jsp导出pdf格式的几种方法(jsPDF,iText,wkhtmltopdf)

    在许多生成报表的时候需要我们后台作出动态的数据,并渲染到前端生成pdf格式,Excel格式的各种报表,但是浏览器自带的生成pdf功能,windows系统的ctrl+p键就能完全搞定这一需求,但对客户来 ...

随机推荐

  1. ubuntu 16.04菜单栏不显示

    解决办法: restart unity-pannel-service

  2. Mysql 5.7 liunx 忘记密码的补救方法

    linux下mysql的root密码忘记解决方 1.修改MySQL的登录设置 # vim /etc/my.cnf 在[mysqld]的段中加上一句: skip-grant-tables 例如: [my ...

  3. Google Careers 程序员必修课

    quote from : https://www.google.com/about/careers/students/guide-to-technical-development.html Techn ...

  4. hdu 4587(割点的应用)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4587 思路:题目的意思很简单,就是删除任意2个节点以及关联的边,求图的最大连通分量数.我们知道删除割点 ...

  5. day20常用模块

    一.正则内容的补充 import re # ret = re.findall(r'www\.baidu\.com|www\.oldboy\.com','www.baidu.com') # # ret ...

  6. spring mvc3.1 @ResponseBody注解生成大量Accept-Charset

    Spring3 MVC使用@ResponseBody后会产生非常大的响应头(Accept-Charset会达到4K+).原因在于默认情况下StringHttpMessageConverter.writ ...

  7. phpstorm将多个int数字拼接成字符串

    场景:将程序输出的多个int数字拼成以','分隔的字符串 数据为 8680 24399 37619 45425 49635 139334 386918 429498 461616 523384 561 ...

  8. PhotoSwipe异步动态加载图片

    在开发搜房家居M站的时候,搜房家居装修效果图相册展示效果需要用到PhotoSwipe插件来显示图片.特点:1. 家居提供的接口,每次只能获取一张图片2. 装修效果图的张数不限.3. 从PhotoSwi ...

  9. HDU4771(2013 Asia Hangzhou Regional Contest )

    http://acm.hdu.edu.cn/showproblem.php?pid=4771 题目大意: 给你一幅图(N*M)“@”是起点,"#"是墙,“.”是路,然后图上有K个珠 ...

  10. EasyNVR摄像机无插件直播按需RTSP拉流播放流程详解

    1.背景需求 有许多客户现场,有许多设备但是不需要一直向设备端取视频流,因为在用户不观看的情况下,还在获取视频资源,一方面大大的浪费了网络带宽资源,一方面对设备服务器要求也较高,用户成本就要提高,这是 ...