mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复cloneSheet参数错误导致非XSSFWorkbook错误命名问题
This commit is contained in:
parent
de32f87658
commit
93393b9188
@ -10,7 +10,7 @@
|
|||||||
* See the Mulan PSL v2 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.dromara.hutool.core.util;
|
package org.dromara.hutool.core.math;
|
||||||
|
|
||||||
import org.dromara.hutool.core.lang.Console;
|
import org.dromara.hutool.core.lang.Console;
|
||||||
import org.dromara.hutool.core.math.NumberUtil;
|
import org.dromara.hutool.core.math.NumberUtil;
|
@ -212,7 +212,8 @@ public class ExcelBase<T extends ExcelBase<T>> implements Closeable {
|
|||||||
sheet = workbook.cloneSheet(sheetIndex, newSheetName);
|
sheet = workbook.cloneSheet(sheetIndex, newSheetName);
|
||||||
} else {
|
} else {
|
||||||
sheet = this.workbook.cloneSheet(sheetIndex);
|
sheet = this.workbook.cloneSheet(sheetIndex);
|
||||||
this.workbook.setSheetName(sheetIndex, newSheetName);
|
// issue#I8QIBB,clone后的sheet的index应该重新获取
|
||||||
|
this.workbook.setSheetName(workbook.getSheetIndex(sheet), newSheetName);
|
||||||
}
|
}
|
||||||
if (setAsCurrentSheet) {
|
if (setAsCurrentSheet) {
|
||||||
this.sheet = sheet;
|
this.sheet = sheet;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user