| | |
| | | |
| | | /** |
| | | * Excel导出实现 |
| | | * @author Eva.Caesar Liu |
| | | * @author dm |
| | | * @since 2025/03/31 16:44 |
| | | */ |
| | | @Data |
| | |
| | | String encodeFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()) + ".xlsx"; |
| | | response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName); |
| | | response.setContentType("application/octet-stream"); |
| | | response.setHeader("eva-opera-type", "download"); |
| | | response.setHeader("eva-download-filename", encodeFileName); |
| | | response.setHeader("doumee-opera-type", "download"); |
| | | response.setHeader("doumee-download-filename", encodeFileName); |
| | | this.exportData(data, sheetName, response.getOutputStream()); |
| | | } catch (IOException e) { |
| | | throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e); |