Class MapRowHandler

All Implemented Interfaces:
RowHandler

public abstract class MapRowHandler extends AbstractRowHandler<Map<String,Object>>
Map形式的行处理器 将一行数据转换为Map,key为指定行,value为当前行对应位置的值
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • MapRowHandler

      public MapRowHandler(int headerRowIndex, int startRowIndex, int endRowIndex)
      构造
      Parameters:
      headerRowIndex - 标题所在行(从0开始计数)
      startRowIndex - 读取起始行(包含,从0开始计数)
      endRowIndex - 读取结束行(包含,从0开始计数)
  • Method Details

    • handle

      public void handle(int sheetIndex, long rowIndex, List<Object> rowCells)
      Description copied from interface: RowHandler
      处理一行数据
      Specified by:
      handle in interface RowHandler
      Overrides:
      handle in class AbstractRowHandler<Map<String,Object>>
      Parameters:
      sheetIndex - 当前Sheet序号
      rowIndex - 当前行号,从0开始计数
      rowCells - 行数据,每个Object表示一个单元格的值