类 AxolotlExcelReader<T>

java.lang.Object
cn.toutatis.xvoid.axolotl.excel.reader.support.AxolotlAbstractExcelReader<T>
cn.toutatis.xvoid.axolotl.excel.reader.AxolotlExcelReader<T>
所有已实现的接口:
Iterator<List<T>>

public class AxolotlExcelReader<T> extends AxolotlAbstractExcelReader<T> implements Iterator<List<T>>
Excel读取器
作者:
Toutatis_Gc
  • 构造器详细资料

    • AxolotlExcelReader

      public AxolotlExcelReader(File excelFile)
    • AxolotlExcelReader

      public AxolotlExcelReader(File excelFile, boolean withDefaultConfig)
    • AxolotlExcelReader

      public AxolotlExcelReader(File excelFile, Class<T> clazz)
    • AxolotlExcelReader

      public AxolotlExcelReader(InputStream ins)
    • AxolotlExcelReader

      public AxolotlExcelReader(InputStream ins, Class<T> clazz)
    • AxolotlExcelReader

      public AxolotlExcelReader(File excelFile, Class<T> clazz, boolean withDefaultConfig)
  • 方法详细资料

    • hasNext

      public boolean hasNext()
      是否有下一批数据
      指定者:
      hasNext 在接口中 Iterator<T>
    • next

      public List<T> next()
      获取下一批数据
      指定者:
      next 在接口中 Iterator<T>
    • readSheetData

      public List<T> readSheetData()
      读取表数据 无任何形参,读取表中全部数据
    • readSheetData

      public List<T> readSheetData(int start)
      读取表数据
      参数:
      start - 起始位置
    • readSheetData

      public List<T> readSheetData(int start, int end)
      读取起始和结束位置数据 可以指定开始结束位置
      参数:
      start - 起始位置
      end - 结束位置
    • readSheetData

      public List<T> readSheetData(int start, int end, int initialRowPositionOffset)
      读取表数据 可以指定开始结束位置和起始偏移行数
      参数:
      start - 起始位置
      end - 结束位置
      initialRowPositionOffset - 初始行偏移量
    • readSheetData

      protected List<T> readSheetData(String sheetName, int sheetIndex, int start, int end, int initialRowPositionOffset)
      使用表级配置读取数据
      参数:
      sheetName - 工作表名称
      sheetIndex - sheet索引
      initialRowPositionOffset - 初始行偏移量
      返回:
      读取的数据
    • readSheetData

      public <RT> List<RT> readSheetData(Class<RT> castClass, String sheetName)
      参数:
      castClass - 读取的Java类型
      sheetName - 工作表名称
    • readSheetData

      public <RT> List<RT> readSheetData(Class<RT> castClass, int sheetIndex)
      参数:
      castClass - 读取的Java类型
      sheetIndex - 表索引
    • readSheetDataOffset

      public <RT> List<RT> readSheetDataOffset(Class<RT> castClass, int initialRowPositionOffset)
      参数:
      castClass - 读取的Java类型
      initialRowPositionOffset - 起始偏移量
    • readSheetData

      public <RT> List<RT> readSheetData(Class<RT> castClass)
      参数:
      castClass - 读取的Java类型
    • readSheetData

      public <RT> List<RT> readSheetData(Class<RT> castClass, int sheetIndex, boolean withDefaultConfig, int startIndex, int endIndex, int initialRowPositionOffset)
      读取指定sheet的数据
      类型参数:
      RT - 类型泛型
      参数:
      castClass - 读取的类型
      sheetIndex - sheet索引
      withDefaultConfig - 是否使用默认配置
      startIndex - 起始行
      endIndex - 结束行
      initialRowPositionOffset - 起始行偏移量
      返回:
      读取的数据
    • readSheetData

      public <RT> List<RT> readSheetData(ReadConfigBuilder<RT> configBuilder)
      使用读取配置构建读取配置
      类型参数:
      RT - 读取的类型泛型
      参数:
      configBuilder - 读取配置构建器
      返回:
      读取数据
    • readSheetData

      public <RT> List<RT> readSheetData(ReaderConfig<RT> readerConfig)
      [ROOT] 读取Excel数据
      类型参数:
      RT - 读取的类型泛型
      参数:
      readerConfig - 读取配置
      返回:
      读取数据