导出时自由选择路径的代码如下:
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()
2、前端代码:
window.open("getExcelList","_blank")