设为首页
优惠IDC
收藏本站
六狼博客
六狼论坛
开启辅助访问
切换到窄版
用户名
Email
自动登录
找回密码
密码
登录
立即注册
只需一步,快速开始
只需一步,快速开始
快捷导航
门户
首页
BBS
云计算
大数据
手机
移动开发android,ios,windows phone,windows mobile
编程
编程技术java,php,python,delphi,ruby,c,c++
前端
WEB前端htmlcss,javascript,jquery,html5
数据库
数据库开发Access,mysql,oracle,sql server,MongoDB
系统
操作系统windows,linux,unix,os,RedHat,tomcat
架构
项目管理
软件设计,架构设计,面向对象,设计模式,项目管理
企业
服务
运维实战
神马
搜索
搜索
热搜:
php
java
python
ruby
hadoop
sphinx
solr
ios
android
windows
centos
本版
帖子
用户
六狼论坛
»
首页
›
WEB前端
›
Html/Css
›
自己封装的poi,itext报表导出代码
返回列表
查看:
181
|
回复:
0
自己封装的poi,itext报表导出代码
[复制链接]
jandroid
jandroid
当前离线
积分
174
窥视卡
雷达卡
升级
82.67%
当前用户组为
秀才
当前积分为
174
, 升到下一级还需要 26 点。
50
主题
50
主题
50
主题
秀才
秀才, 积分 174, 距离下一级还需 26 积分
秀才, 积分 174, 距离下一级还需 26 积分
积分
174
发消息
楼主
|
发表于 2013-2-8 00:03:59
|
显示全部楼层
|
阅读模式
页面代码:
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; width: 98%; font-size: 13px;">
<!
DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.01 Transitional//EN
"
"
http://www.w3.org/TR/html4/loose.dtd
"
>
<%
@ page contentType
=
"
text/html; charset=utf-8
"
isELIgnored
=
"
false
"
%>
<%
@ taglib prefix
=
"
c
"
uri
=
"
http://java.sun.com/jsp/jstl/core
"
%>
<%
String path
=
request.getContextPath();
%>
<
html
>
<
head
>
<
meta http
-
equiv
=
"
Content-Type
"
content
=
"
text/html; charset=UTF-8
"
>
<
link rel
=
"
stylesheet
"
type
=
"
text/css
"
href
=
"
<%=path %>/css/style.css
"
>
<
link rel
=
"
stylesheet
"
type
=
"
text/css
"
href
=
"
<%=path %>/css/easyui.css
"
>
<
link rel
=
"
stylesheet
"
type
=
"
text/css
"
href
=
"
<%=path %>/css/icon.css
"
>
<
script type
=
"
text/javascript
"
src
=
"
<%=path %>/js/jquery.js
"
></
script
>
<
script type
=
"
text/javascript
"
src
=
"
<%=path %>/js/jquery.easyui.min.js
"
></
script
>
<
script type
=
"
text/javascript
"
src
=
"
<%=path %>/js/mouseEvnet.js
"
></
script
>
<
script type
=
"
text/javascript
"
src
=
"
<%=path %>/js/page.js
"
></
script
>
<
script type
=
"
text/javascript
"
src
=
"
<%=path %>/js/sorttable.js
"
></
script
>
<
script type
=
"
text/javascript
"
>
function export_report(type,title)
{
var tableHeader
=
""
;
var tableBody
=
""
;
//
获取表格信息
$(
"
#tableResult tr
"
).each(function(i,_tr)
{
$(_tr).children().each(function(k,_td)
{
if
(i
==
0
)
{
tableHeader
+=
$.trim($(_td).text())
+
"
,
"
;
}
else
{
tableBody
+=
$.trim($(_td).text())
+
"
##
"
;
}
}
);
if
(i
>
0
)
{
tableBody
+=
"
@@
"
;
}
}
);
if
(tableHeader
==
""
)
{
alert(
"
表头未初始化!
"
);
return
false
;
}
if
(tableBody
==
""
)
{
alert(
"
表格体没内容!
"
);
return
false
;
}
$(
"
#report_title
"
).val(title);
$(
"
#report_type
"
).val(type);
$(
"
#report_tableHeader
"
).val(tableHeader);
$(
"
#report_tableBody
"
).val(tableBody);
$(
"
#report_form
"
).submit();
}
</
script
>
</
head
>
<
body
>
<
form action
=
"
#
"
method
=
"
post
"
target
=
"
_self
"
name
=
"
naturalPerson
"
id
=
"
naturalPerson
"
>
<
c:
if
test
=
"
${list==null||empty list}
"
var
=
"
val
"
>
<
center
><
font color
=
'
red
'
size
=
3
>
对不起,没有你要查询的记录
!!!</
font
></
center
>
</
c:
if
>
<
c:
if
test
=
"
${!val}
"
>
<
div
class
=
"
dispaly-div
"
>
<
table id
=
"
tableResult
"
width
=
"
100%
"
border
=
"
0
"
align
=
"
center
"
cellpadding
=
"
0
"
cellspacing
=
"
0
"
style
=
"
border-collapse: collapse;
"
class
=
"
sortable
"
>
<
thead
>
<
tr style
=
"
cursor: pointer;
"
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
户人编号
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
户编号
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
姓名
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
性别
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
现居住地
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
户籍所在地
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
公民身份证号码
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
出生日期
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
民族
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
文化程度
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
户口性质
</
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_LTBG
"
>
婚姻状况
</
td
>
</
tr
>
</
thead
>
<
c:forEach items
=
"
${list}
"
var
=
"
naturalPerson
"
>
<
tr
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.hrbh}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.hbh}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.xm}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.xb}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.xjzd}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.hjszd}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.gmsfzhm}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.csrq}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.mz}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.whcd}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.kuxz}
"
/></
td
>
<
td height
=
"
28
"
align
=
"
center
"
class
=
"
td_TRB
"
><
c:out value
=
"
${naturalPerson.hyzk}
"
/></
td
>
</
tr
>
</
c:forEach
>
</
table
>
</
div
>
<
table width
=
"
100%
"
border
=
"
0
"
align
=
"
center
"
cellpadding
=
"
0
"
cellspacing
=
"
0
"
>
<
tr
>
<
td height
=
"
25
"
align
=
"
right
"
class
=
"
td_RB
"
>
<
span style
=
"
margin-right: 20%;
"
<span style="color: #000000;">></sp
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
千斤顶
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
立即注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
mfs/MooseFS
Copyright © 2008-2020
六狼论坛
(http://it.6wolf.com) 版权所有 All Rights Reserved.
Powered by
Discuz!
X3.4
京ICP备14020293号-2
本网站内容均收集于互联网,如有问题请联系
QQ:389897944
予以删除
快速回复
返回顶部
返回列表