ExportExcel exp = new ExportExcel("工分池管理", WorkpointsPool.class, 1)
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream()
exp.setDataList(list).write(byteArrayOut)
byte[] excelBytes= byteArrayOut.toByteArray()
byteArrayOut.close()
exp.dispose()
//輸出response響應流
//防止中文亂碼
String fileName=new String("工分池管理.xls".getBytes("gb2312"),"iso8859-1")
response.reset()
response.setContentType("application/msexcel;charset=utf-8")
response.setHeader("Content-disposition", "attachment;filename="+fileName)
response.getOutputStream().write(excelBytes)
response.getOutputStream().flush()
response.getOutputStream().close()