public abstract class AbstractExcelReader<T> extends Object implements ExcelReader<T>
| 构造器和说明 |
|---|
AbstractExcelReader() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract ExcelReaderWrapper<T> |
getWrapper() |
protected boolean |
isHeader(ExcelReaderCallBack.CellContent content,
List<String> header)
判断一个单元格是否为表头,默认判断条件为:表格的第一行就是表头
|
List<T> |
readExcel(InputStream inputStream)
读取excel为java对象集合
|
protected T |
wrapperRow(List<String> headers,
List<ExcelReaderCallBack.CellContent> contents,
int sheet)
包装一个对象
|
protected ExcelApi api
public abstract ExcelReaderWrapper<T> getWrapper()
public List<T> readExcel(InputStream inputStream) throws Exception
ExcelReaderreadExcel 在接口中 ExcelReader<T>inputStream - excel输入流Exception - 读取异常protected T wrapperRow(List<String> headers, List<ExcelReaderCallBack.CellContent> contents, int sheet) throws Exception
headers - 表头信息contents - 一行的数据Exceptionprotected boolean isHeader(ExcelReaderCallBack.CellContent content, List<String> header)
content - 单元格数据header - 已有的表头Copyright © 2018. All rights reserved.