Class Excel07SaxReader

java.lang.Object
org.aoju.bus.office.excel.sax.Excel07SaxReader
All Implemented Interfaces:
ExcelSaxReader<Excel07SaxReader>

public class Excel07SaxReader extends Object implements ExcelSaxReader<Excel07SaxReader>
Sax方式读取Excel文件 Excel2007格式说明见:http://www.cnblogs.com/wangmingshun/p/6654143.html
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • Excel07SaxReader

      public Excel07SaxReader(RowHandler rowHandler)
      构造
      Parameters:
      rowHandler - 行处理器
  • Method Details

    • setRowHandler

      public Excel07SaxReader setRowHandler(RowHandler rowHandler)
      设置行处理器
      Parameters:
      rowHandler - 行处理器
      Returns:
      this
    • read

      public Excel07SaxReader read(File file, int rid) throws org.aoju.bus.core.exception.InternalException
      Description copied from interface: ExcelSaxReader
      开始读取Excel
      Specified by:
      read in interface ExcelSaxReader<Excel07SaxReader>
      Parameters:
      file - Excel文件
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      public Excel07SaxReader read(File file, String idOrRidOrSheetName) throws org.aoju.bus.core.exception.InternalException
      Description copied from interface: ExcelSaxReader
      开始读取Excel
      Specified by:
      read in interface ExcelSaxReader<Excel07SaxReader>
      Parameters:
      file - Excel文件
      idOrRidOrSheetName - Excel中的sheet id或者rid编号,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      public Excel07SaxReader read(InputStream in, int rid) throws org.aoju.bus.core.exception.InternalException
      Description copied from interface: ExcelSaxReader
      开始读取Excel,读取结束后并不关闭流
      Specified by:
      read in interface ExcelSaxReader<Excel07SaxReader>
      Parameters:
      in - Excel流
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

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

      public Excel07SaxReader read(org.apache.poi.openxml4j.opc.OPCPackage opcPackage, int rid) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,Sheet编号从0开始计数
      Parameters:
      opcPackage - OPCPackage,Excel包,读取后不关闭
      rid - Excel中的sheet rid编号,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      public Excel07SaxReader read(org.apache.poi.openxml4j.opc.OPCPackage opcPackage, String idOrRidOrSheetName) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,Sheet编号从0开始计数
      Parameters:
      opcPackage - OPCPackage,Excel包,读取后不关闭
      idOrRidOrSheetName - Excel中的sheet id或者rid编号或sheet名,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常
    • read

      public Excel07SaxReader read(org.apache.poi.xssf.eventusermodel.XSSFReader xssfReader, String idOrRidOrSheetName) throws org.aoju.bus.core.exception.InternalException
      开始读取Excel,Sheet编号从0开始计数
      Parameters:
      xssfReader - XSSFReader,Excel读取器
      idOrRidOrSheetName - Excel中的sheet id或者rid编号或sheet名,rid必须加rId前缀,例如rId1,如果为-1处理所有编号的sheet
      Returns:
      this
      Throws:
      org.aoju.bus.core.exception.InternalException - POI异常