使用hutool切换Excel默认激活的sheet

Workbook workbook = WorkbookUtil.createBook(file);
workbook.setActiveSheet(workbook.getSheetIndex(sheetName));
ExcelWriter excelWriter = new ExcelWriter(workbook,sheetName);
excelWriter.flush(response.getOutputStream());

 

posted @ 2022-05-19 00:14  追极  阅读(267)  评论(0编辑  收藏  举报