java poi导出excel压缩成zip格式
如题。
OutputStream out = response.getOutputStream();
ZipOutputStream zip = new ZipOutputStream(out);
ZipEntry entry = new ZipEntry("xx.xls");
zip.putNextEntry(entry);
workbook.write(zip);
zip.flush();
zip.close();
这样导出来是整个action 求教~!
------解决方案--------------------最后一句没加return;