mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复cloneSheet参数错误导致非XSSFWorkbook错误命名问题
This commit is contained in:
@@ -189,7 +189,8 @@ public class ExcelBase<T extends ExcelBase<T>> implements Closeable {
|
||||
sheet = workbook.cloneSheet(sheetIndex, newSheetName);
|
||||
} else {
|
||||
sheet = this.workbook.cloneSheet(sheetIndex);
|
||||
this.workbook.setSheetName(sheetIndex, newSheetName);
|
||||
// issue#I8QIBB,clone后的sheet的index应该重新获取
|
||||
this.workbook.setSheetName(workbook.getSheetIndex(sheet), newSheetName);
|
||||
}
|
||||
if (setAsCurrentSheet) {
|
||||
this.sheet = sheet;
|
||||
|
Reference in New Issue
Block a user