类 AxolotlExcelReader<T>
java.lang.Object
cn.toutatis.xvoid.axolotl.excel.reader.support.AxolotlAbstractExcelReader<T>
cn.toutatis.xvoid.axolotl.excel.reader.AxolotlExcelReader<T>
public class AxolotlExcelReader<T>
extends AxolotlAbstractExcelReader<T>
implements Iterator<List<T>>
Excel读取器
- 作者:
- Toutatis_Gc
-
字段概要
从类继承的字段 cn.toutatis.xvoid.axolotl.excel.reader.support.AxolotlAbstractExcelReader
_sheetLevelReaderConfig, validator, workBookContext -
构造器概要
构造器构造器说明AxolotlExcelReader(File excelFile) AxolotlExcelReader(File excelFile, boolean withDefaultConfig) AxolotlExcelReader(File excelFile, Class<T> clazz) AxolotlExcelReader(File excelFile, Class<T> clazz, boolean withDefaultConfig) AxolotlExcelReader(InputStream ins, Class<T> clazz) -
方法概要
修饰符和类型方法说明booleanhasNext()是否有下一批数据next()获取下一批数据读取表数据 无任何形参,读取表中全部数据readSheetData(int start) 读取表数据readSheetData(int start, int end) 读取起始和结束位置数据 可以指定开始结束位置readSheetData(int start, int end, int initialRowPositionOffset) 读取表数据 可以指定开始结束位置和起始偏移行数<RT> List<RT>readSheetData(ReadConfigBuilder<RT> configBuilder) 使用读取配置构建读取配置<RT> List<RT>readSheetData(ReaderConfig<RT> readerConfig) [ROOT] 读取Excel数据<RT> List<RT>readSheetData(Class<RT> castClass) <RT> List<RT>readSheetData(Class<RT> castClass, int sheetIndex) <RT> List<RT>readSheetData(Class<RT> castClass, int sheetIndex, boolean withDefaultConfig, int startIndex, int endIndex, int initialRowPositionOffset) 读取指定sheet的数据<RT> List<RT>readSheetData(Class<RT> castClass, String sheetName) readSheetData(String sheetName, int sheetIndex, int start, int end, int initialRowPositionOffset) 使用表级配置读取数据<RT> List<RT>readSheetDataOffset(Class<RT> castClass, int initialRowPositionOffset) 从类继承的方法 cn.toutatis.xvoid.axolotl.excel.reader.support.AxolotlAbstractExcelReader
adaptiveCellValue2EntityClass, adaptiveValue, assignValueToField, castValue, checkFileFormat, convertCellToInstance, convertPositionCellToInstance, createAdditionalExtensions, getBlankCellValue, getCellOriginalValue, getFileOrStreamDetectResult, getFormulaCellValue, getHumanReadablePosition, getIndexCellValue, getPhysicalRowNumber, getPhysicalRowNumber, getPositionCellOriginalValue, getRecordRowNumber, getRecordRowNumber, getRowNumber, getRowNumber, getRowNumber, loadFileDataToWorkBook, preCheckAndFixReadConfig, readRow, readSheetDataAsObject, readSheetDataAsObject, row2MapInstance, row2SimplePOJO, searchHeaderCellPosition, searchSheet, spreadMergedCells, validateConvertEntity从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.util.Iterator
forEachRemaining, remove
-
构造器详细资料
-
AxolotlExcelReader
-
AxolotlExcelReader
-
AxolotlExcelReader
-
AxolotlExcelReader
-
AxolotlExcelReader
-
AxolotlExcelReader
-
-
方法详细资料
-
hasNext
public boolean hasNext()是否有下一批数据 -
next
获取下一批数据 -
readSheetData
读取表数据 无任何形参,读取表中全部数据 -
readSheetData
读取表数据- 参数:
start- 起始位置
-
readSheetData
读取起始和结束位置数据 可以指定开始结束位置- 参数:
start- 起始位置end- 结束位置
-
readSheetData
读取表数据 可以指定开始结束位置和起始偏移行数- 参数:
start- 起始位置end- 结束位置initialRowPositionOffset- 初始行偏移量
-
readSheetData
protected List<T> readSheetData(String sheetName, int sheetIndex, int start, int end, int initialRowPositionOffset) 使用表级配置读取数据- 参数:
sheetName- 工作表名称sheetIndex- sheet索引initialRowPositionOffset- 初始行偏移量- 返回:
- 读取的数据
-
readSheetData
- 参数:
castClass- 读取的Java类型sheetName- 工作表名称
-
readSheetData
- 参数:
castClass- 读取的Java类型sheetIndex- 表索引
-
readSheetDataOffset
- 参数:
castClass- 读取的Java类型initialRowPositionOffset- 起始偏移量
-
readSheetData
- 参数:
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
使用读取配置构建读取配置- 类型参数:
RT- 读取的类型泛型- 参数:
configBuilder- 读取配置构建器- 返回:
- 读取数据
-
readSheetData
[ROOT] 读取Excel数据- 类型参数:
RT- 读取的类型泛型- 参数:
readerConfig- 读取配置- 返回:
- 读取数据
-