Skip to content

Commit

Permalink
修改在传入List<List<Object>>判断行数错误 #526
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuangjiaju committed Sep 4, 2019
1 parent 2b219d4 commit 120dfbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ private void doAddBasicTypeToExcel(List<Object> oneRowData, Head head, Row row,
beforeCellCreate(row, head, relativeRowIndex);
Cell cell = WorkBookUtil.createCell(row, cellIndex);
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);
}

Expand Down

0 comments on commit 120dfbd

Please sign in to comment.