Package org.aoju.bus.office.excel.sax
Class MapRowHandler
java.lang.Object
org.aoju.bus.office.excel.sax.AbstractRowHandler<Map<String,Object>>
org.aoju.bus.office.excel.sax.MapRowHandler
- All Implemented Interfaces:
RowHandler
Map形式的行处理器
将一行数据转换为Map,key为指定行,value为当前行对应位置的值
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class org.aoju.bus.office.excel.sax.AbstractRowHandler
convertFunc, endRowIndex, startRowIndex -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.aoju.bus.office.excel.sax.AbstractRowHandler
handleDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aoju.bus.office.excel.sax.RowHandler
doAfterAllAnalysed, handleCell
-
Constructor Details
-
MapRowHandler
public MapRowHandler(int headerRowIndex, int startRowIndex, int endRowIndex) 构造- Parameters:
headerRowIndex- 标题所在行(从0开始计数)startRowIndex- 读取起始行(包含,从0开始计数)endRowIndex- 读取结束行(包含,从0开始计数)
-
-
Method Details
-
handle
Description copied from interface:RowHandler处理一行数据- Specified by:
handlein interfaceRowHandler- Overrides:
handlein classAbstractRowHandler<Map<String,Object>> - Parameters:
sheetIndex- 当前Sheet序号rowIndex- 当前行号,从0开始计数rowCells- 行数据,每个Object表示一个单元格的值
-