Browse Source

修改在传入List<List<Object>>判断行数错误 #526

pull/551/head
Jiaju Zhuang 5 years ago
parent
commit
120dfbd62e
  1. 3
      src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java

3
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java

@ -185,7 +185,8 @@ public class ExcelBuilderImpl implements ExcelBuilder {
beforeCellCreate(row, head, relativeRowIndex); beforeCellCreate(row, head, relativeRowIndex);
Cell cell = WorkBookUtil.createCell(row, cellIndex); Cell cell = WorkBookUtil.createCell(row, cellIndex);
Object value = oneRowData.get(dataIndex); Object value = oneRowData.get(dataIndex);
CellData cellData = converterAndSet(context.currentWriteHolder(), value.getClass(), cell, value, null); CellData cellData =
converterAndSet(context.currentWriteHolder(), value == null ? null : value.getClass(), cell, value, null);
afterCellCreate(head, cellData, cell, relativeRowIndex); afterCellCreate(head, cellData, cell, relativeRowIndex);
} }

Loading…
Cancel
Save