public class AxolotlExcelReader<T> extends Object
| 构造器和说明 |
|---|
AxolotlExcelReader(File excelFile)
构造文件读取器
|
AxolotlExcelReader(File excelFile,
boolean withDefaultConfig) |
AxolotlExcelReader(File excelFile,
Class<T> clazz) |
AxolotlExcelReader(File excelFile,
Class<T> clazz,
boolean withDefaultConfig)
[ROOT]
构造文件读取器
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getHumanReadablePosition() |
int |
getPhysicalRowNumber() |
int |
getPhysicalRowNumber(ReaderConfig<?> readerConfig) |
int |
getRecordRowNumber() |
int |
getRecordRowNumber(ReaderConfig<?> readerConfig) |
int |
getRowNumber(boolean isPhysical)
获取行数
|
int |
getRowNumber(int sheetIndex,
boolean isPhysical)
[ROOT]
获取行数
|
int |
getRowNumber(ReaderConfig<?> readerConfig,
boolean isPhysical)
获取行数
|
List<T> |
readSheetData() |
<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) |
List<T> |
readSheetData(int start) |
List<T> |
readSheetData(int start,
int end) |
List<T> |
readSheetData(int start,
int end,
int initialRowPositionOffset) |
<RT> List<RT> |
readSheetData(ReadConfigBuilder<RT> configBuilder)
使用读取配置构建读取配置
|
<RT> List<RT> |
readSheetData(ReaderConfig<RT> readerConfig)
[ROOT]
读取Excel数据
|
<RT> RT |
readSheetDataAsObject(ReaderConfig<RT> readerConfig)
[ROOT]
读取Excel文件数据为一个实体
|
public AxolotlExcelReader(File excelFile)
public AxolotlExcelReader(File excelFile, boolean withDefaultConfig)
public <RT> RT readSheetDataAsObject(ReaderConfig<RT> readerConfig)
RT - 读取类型readerConfig - 读取配置public <RT> List<RT> readSheetData(Class<RT> castClass, int sheetIndex, boolean withDefaultConfig, int startIndex, int endIndex, int initialRowPositionOffset)
RT - 类型泛型castClass - 读取的类型sheetIndex - sheet索引withDefaultConfig - 是否使用默认配置startIndex - 起始行endIndex - 结束行initialRowPositionOffset - 起始行偏移量public <RT> List<RT> readSheetData(ReadConfigBuilder<RT> configBuilder)
RT - 读取的类型泛型configBuilder - 读取配置构建器public <RT> List<RT> readSheetData(ReaderConfig<RT> readerConfig)
RT - 读取的类型泛型readerConfig - 读取配置public int getPhysicalRowNumber()
public int getRecordRowNumber()
public int getRowNumber(boolean isPhysical)
isPhysical - 是否是物理行数public int getRowNumber(ReaderConfig<?> readerConfig, boolean isPhysical)
readerConfig - 读取配置isPhysical - 是否是物理行数public int getPhysicalRowNumber(ReaderConfig<?> readerConfig)
public int getRecordRowNumber(ReaderConfig<?> readerConfig)
public int getRowNumber(int sheetIndex,
boolean isPhysical)
sheetIndex - 表索引isPhysical - 是否是物理行数public String getHumanReadablePosition()
Copyright © 2024. All rights reserved.