<%@ 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. redis主从备份

    redis主从备份,默认是读写分离的,master用于写,slave用于读.slave的写只能用于存储一些短暂状态的变量,应为在下次同步时,会被移除. 配置主从备份原则:配从不配主,既只需修改从库配置 ...

  2. int abs(int number)函数有感: 求补码和通过补码求对应的整数 C++(增加:数字的二进制表示中1的个数)

    #include "limits.h" #include "math.h" int abs(int number) { int const mask = num ...

  3. Java基础 - 强引用、弱引用、软引用、虚引用

    1.强引用(StrongReference) 强引用是使用最普遍的引用. 假设一个对象具有强引用.那垃圾回收器绝不会回收它.例如以下: [java] view plaincopyprint" ...

  4. C#二进制序列化和反序列化

    public class WRSerializable { public static void SerializeToFile<T>(T _description, string _fi ...

  5. GoogleMap-------manifest文件配置

    前言:在使用GoopleMap之前需要配置manifest文件 1.这个可有可无,com.xhm.meishi是项目的包名 <!-- 声明调用这个应用需要的权限 --> <permi ...

  6. 2205 Problem B

    问题 B: [高精度]简单高精度加法 时间限制: 1 Sec  内存限制: 64 MB 提交: 77  解决: 25 [提交][状态][讨论版] 题目描述 修罗王解决了计算机的内存限制问题,终于可以使 ...

  7. [JAVA &#183; 0基础]:19.容器类

    概述 容器 就是存放数据的一个集合 (java提供了一个接口专门去约束我们容器的实现类) watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L ...

  8. 多用户商城系统 KgMall2.1公布

    2014-5-28日,广州JUULUU公布多用户商城系统 KgMall2.1,kgMall是国内一款JAVA开源多用户版商城系统,新版KgMall更加模块化,juuluu团队重构了Kgcms的多个模块 ...

  9. cocos2d-x设计模式发掘之一:单例模式

       作者: firedragonpzy  原地址:http://www.firedragonpzy.com.cn/index.php/archives/1781 本系列文章我将和大家一起来发掘coc ...

  10. 《从零开始学Swift》学习笔记(Day 12)——说几个特殊运算符

    原创文章,欢迎转载.转载请注明:关东升的博客   除了一些常用的运算符,还有一些其他的: •      引用号(.):实例调用属性.方法等操作符. •      问号(?):用来声明可选类型. •   ...