使用hutool切换Excel默认激活的sheet
Workbook workbook = WorkbookUtil.createBook(file); workbook.setActiveSheet(workbook.getSheetIndex(sheetName)); ExcelWriter excelWriter = new ExcelWriter(workbook,sheetName); excelWriter.flush(response.getOutputStream());
Workbook workbook = WorkbookUtil.createBook(file); workbook.setActiveSheet(workbook.getSheetIndex(sheetName)); ExcelWriter excelWriter = new ExcelWriter(workbook,sheetName); excelWriter.flush(response.getOutputStream());