mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add MethodUtil
This commit is contained in:
@@ -2,9 +2,9 @@ package cn.hutool.poi.excel.sax;
|
||||
|
||||
import cn.hutool.core.io.IORuntimeException;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.reflect.ReflectUtil;
|
||||
import cn.hutool.core.reflect.MethodUtil;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.poi.excel.sax.handler.RowHandler;
|
||||
import cn.hutool.poi.exceptions.POIException;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
@@ -20,7 +20,7 @@ import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* Sax方式读取Excel文件<br>
|
||||
* Excel2007格式说明见:http://www.cnblogs.com/wangmingshun/p/6654143.html
|
||||
* Excel2007格式说明见:<a href="http://www.cnblogs.com/wangmingshun/p/6654143.html">http://www.cnblogs.com/wangmingshun/p/6654143.html</a>
|
||||
*
|
||||
* @author Looly
|
||||
* @since 3.1.2
|
||||
@@ -130,7 +130,7 @@ public class Excel07SaxReader implements ExcelSaxReader<Excel07SaxReader> {
|
||||
// 获取共享字符串表
|
||||
// POI-5.2.0开始返回值有所变更,导致实际使用时提示方法未找到,此处使用反射调用,解决不同版本返回值变更问题
|
||||
//this.handler.sharedStrings = xssfReader.getSharedStringsTable();
|
||||
this.handler.sharedStrings = ReflectUtil.invoke(xssfReader, "getSharedStringsTable");
|
||||
this.handler.sharedStrings = MethodUtil.invoke(xssfReader, "getSharedStringsTable");
|
||||
|
||||
return readSheets(xssfReader, idOrRidOrSheetName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user