Package org.miaixz.bus.office.excel.sax
Interface ExcelSaxReader<T>
- Type Parameters:
T- 子对象类型,用于标记返回值this
- All Known Implementing Classes:
Excel03SaxReader,Excel07SaxReader
public interface ExcelSaxReader<T>
Sax方式读取Excel接口,提供一些共用方法
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault T开始读取Excel,读取所有sheetdefault T开始读取Excel开始读取Exceldefault Tread(InputStream in) 开始读取Excel,读取所有sheet,读取结束后并不关闭流default Tread(InputStream in, int rid) 开始读取Excel,读取结束后并不关闭流read(InputStream in, String idOrRidOrSheetName) 开始读取Excel,读取结束后并不关闭流default T开始读取Excel,读取所有sheetdefault T开始读取Exceldefault T开始读取Excel
-
Field Details
-
RID_PREFIX
sheet r:Id前缀- See Also:
-
SHEET_NAME_PREFIX
sheet name前缀- See Also:
-
-
Method Details
-
read
T read(File file, String idOrRidOrSheetName) throws org.miaixz.bus.core.lang.exception.InternalException 开始读取Excel- Parameters:
file- Excel文件idOrRidOrSheetName- Excel中的sheet id或者rid编号或sheet名称,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
T read(InputStream in, String idOrRidOrSheetName) throws org.miaixz.bus.core.lang.exception.InternalException 开始读取Excel,读取结束后并不关闭流- Parameters:
in- Excel流idOrRidOrSheetName- Excel中的sheet id或者rid编号,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
开始读取Excel,读取所有sheet- Parameters:
path- Excel文件路径- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
开始读取Excel,读取所有sheet- Parameters:
file- Excel文件- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
开始读取Excel,读取所有sheet,读取结束后并不关闭流- Parameters:
in- Excel包流- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
default T read(String path, int idOrRidOrSheetName) throws org.miaixz.bus.core.lang.exception.InternalException 开始读取Excel- Parameters:
path- 文件路径idOrRidOrSheetName- Excel中的sheet id或者rid编号或sheet名称,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
default T read(String path, String idOrRidOrSheetName) throws org.miaixz.bus.core.lang.exception.InternalException 开始读取Excel- Parameters:
path- 文件路径idOrRidOrSheetName- Excel中的sheet id或者rid编号或sheet名称,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
开始读取Excel- Parameters:
file- Excel文件rid- Excel中的sheet rid编号,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-
read
开始读取Excel,读取结束后并不关闭流- Parameters:
in- Excel流rid- Excel中的sheet rid编号,如果为-1处理所有编号的sheet- Returns:
- this
- Throws:
org.miaixz.bus.core.lang.exception.InternalException- POI异常
-