mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -345,7 +345,7 @@ public class ExcelUtil {
|
||||
* @return {@link BigExcelWriter}
|
||||
* @since 4.1.13
|
||||
*/
|
||||
public static ExcelWriter getBigWriter() {
|
||||
public static BigExcelWriter getBigWriter() {
|
||||
try {
|
||||
return new BigExcelWriter();
|
||||
} catch (NoClassDefFoundError e) {
|
||||
@@ -362,7 +362,7 @@ public class ExcelUtil {
|
||||
* @return {@link BigExcelWriter}
|
||||
* @since 4.1.13
|
||||
*/
|
||||
public static ExcelWriter getBigWriter(int rowAccessWindowSize) {
|
||||
public static BigExcelWriter getBigWriter(int rowAccessWindowSize) {
|
||||
try {
|
||||
return new BigExcelWriter(rowAccessWindowSize);
|
||||
} catch (NoClassDefFoundError e) {
|
||||
|
@@ -3,6 +3,7 @@ package cn.hutool.poi.excel.sax;
|
||||
import cn.hutool.core.io.IORuntimeException;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.poi.excel.sax.handler.RowHandler;
|
||||
import cn.hutool.poi.exceptions.POIException;
|
||||
@@ -127,13 +128,9 @@ public class Excel07SaxReader implements ExcelSaxReader<Excel07SaxReader> {
|
||||
}
|
||||
|
||||
// 获取共享字符串表
|
||||
try {
|
||||
this.handler.sharedStrings = xssfReader.getSharedStringsTable();
|
||||
} catch (IOException e) {
|
||||
throw new IORuntimeException(e);
|
||||
} catch (InvalidFormatException e) {
|
||||
throw new POIException(e);
|
||||
}
|
||||
// POI-5.2.0开始返回值有所变更,导致实际使用时提示方法未找到,此处使用反射调用,解决不同版本返回值变更问题
|
||||
//this.handler.sharedStrings = xssfReader.getSharedStringsTable();
|
||||
this.handler.sharedStrings = ReflectUtil.invoke(xssfReader, "getSharedStringsTable");
|
||||
|
||||
return readSheets(xssfReader, idOrRidOrSheetName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user