主要代码如下:
后台输出Excel文件代码:
OutputStream output = response.getOutputStream();
response.reset();
response.setHeader("Content-disposition", "attachment; filename=" + path);
response.setContentType("Content-Type:application/vnd.ms-excel ");
wb.write(output);
output.close();
前端代码:window.open("getExcelList","_blank");