java 如何一次导出多个 excel 或者 pdf 文件?
通过 打包zip压缩,然后下载,浏览器会阻止下载多个文件的,会认为程序在恶意弹框,所以 不安装插件的情况下 ,只能 打包zip下载
http://blog.csdn.net/jibaole/article/details/52086559
http://liily.iteye.com/blog/1851221
Workbook wb = new Workbook();
Sheet sheet1 = wb.openSheet("Sheet1");
Table table = sheet1.openTable("B1:F2");
for(int i=0; i<20000;i++) {
table.getDataFields().get(0).setValue (String.valueOf(i));//B列
table.getDataFields().get(1).setValue("测试");//C列
table.getDataFields().get(2).setValue("测试");//D列
table.getDataFields().get(3).setValue("测试");//E列
table.getDataFields().get(4).setValue("测试");//F列
table.nextRow();
}
table.close()
PageOfficeCtrl poCtrl1 = new PageOfficeCtrl(request);
poCtrl1.setServerPage("poserver.do"); //此行必须
poCtrl1.webOpen("doc/template.xlsx", OpenModeType.xlsSubmitForm, "");
poCtrl1.setTagId("PageOfficeCtrl1"); //此行必须
导出几个文件,文件里面写什么内容 那还不是你代码逻辑上面自己实现吗。 你是不清楚怎么导出文件吧
是jsp么?打包下载多个文件
http://blog.csdn.net/north_bear/article/details/4562052
或者用弹窗,不过浏览器会拦截,一些用户使用有难度。
你可以把他打包成压缩文件.或者说是把文件生成后告诉前端文档的链接,一个一个下载...希望对你有用.