poi导出excel的时候怎么选择导出路径

2024-11-17 00:41:14
推荐回答(1个)
回答(1):

主要代码如下:
后台输出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");