/**
* 浏览器下载excel
*
* @param fileName 文件名称
* @param wb Workbook
* @param response 响应response
*/
private static void buildExcelDocument(String fileName, Workbook wb, HttpServletResponse response){
try {
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(fileName, "utf-8"));
response.flushBuffer();
wb.write(response.getOutputStream());
} catch (IOException e) {
e.printStackTrace();
}
}