Vue下载文件前后台实现过程
1、本文使用antd pro的前台架构,在前端接口代码中,我们在axios的请求参数中添加responseType: 'blob'。

3、后端处理逻辑,使用hutool的ExcelUtil相关接口存储数据到xlsx文件中,这里写入到多个sheet中

5、然后就是通过OutputStream将结果返回到response的流中交给前端去处理。注意xlsx的数据其contentType为application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8;
