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
    Modifier and Type
    Field
    Description
    static final String
    sheet r:Id 前缀
    static final String
    sheet name 前缀
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    read(File file)
    开始读取Excel,读取所有sheet
    default T
    read(File file, int rid)
    开始读取Excel
    read(File file, String idOrRid)
    开始读取Excel
    default T
    开始读取Excel,读取所有sheet,读取结束后并不关闭流
    default T
    read(InputStream in, int rid)
    开始读取Excel,读取结束后并不关闭流
    read(InputStream in, String idOrRid)
    开始读取Excel,读取结束后并不关闭流
    default T
    read(String path)
    开始读取Excel,读取所有sheet
    default T
    read(String path, int rid)
    开始读取Excel
    default T
    read(String path, String rid)
    开始读取Excel
  • Field Details

  • Method Details

    • read

      T read(File file, String idOrRid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel
      Parameters:
      file - Excel文件
      idOrRid - Excel中的sheet id或者rid编号,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      T read(InputStream in, String idOrRid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,读取结束后并不关闭流
      Parameters:
      in - Excel流
      idOrRid - Excel中的sheet id或者rid编号,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(String path) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,读取所有sheet
      Parameters:
      path - Excel文件路径
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(File file) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,读取所有sheet
      Parameters:
      file - Excel文件
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(InputStream in) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,读取所有sheet,读取结束后并不关闭流
      Parameters:
      in - Excel包流
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(String path, int rid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel
      Parameters:
      path - 文件路径
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(String path, String rid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel
      Parameters:
      path - 文件路径
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(File file, int rid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel
      Parameters:
      file - Excel文件
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      default T read(InputStream in, int rid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,读取结束后并不关闭流
      Parameters:
      in - Excel流
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常