正在进行安全检测...

发布时间:1714338127   来源:文档文库   
字号:

Jsp导出excel表(POI
对于poi导出excel Excel最多可建立255个工作表,一个工作表中65536行。
当你的数据超过65536行时会报异常,这是一个工作薄的情况下。那么如何创建多个工作薄的导出呢,以下是我的思路。
1. 求出你所要导出的数据量 num(intT=num/65000(这里可以自定义,但是总的行数必须小于等于65536 并对其取余,如果等于0 那么就取T不等于0则取T+1
2. 这样做得目的是,每65000条数据,建立一个工作薄代码如下。
3. 代码如下
//人员 导出
//人员 导出
public ActionForward outMessage3(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response{
HashMap map=new HashMap(;


map.put("companyid", Constants.getAdmin(request.getCompanyid(;
int isadmin = Constants.getAdmin(request.getIsadmin(;
int ismaster = Constants.getAdmin(request.getIsmaster(;
int creater = Constants.getAdmin(request.getStaffid(;
int deptid = Constants.getAdmin(request.getDeptid(;
map.put("deptid", deptid;
map.put("creater", creater;
map.put("isadmin", isadmin;
map.put("ismaster", ismaster;
String aid = request.getParameter("aid";
String staffid =request.getParameter("staffid";
System.out.println("aid: "+aid;
if(aid==null||aid==""{

本文来源:https://www.2haoxitong.net/k/doc/05a65422af45b307e87197d4.html

《正在进行安全检测....doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式

相关推荐