Skip to content

Commit

Permalink
fix alibaba#1651: 使用模板填充导出的时候设置自动换行报错
Browse files Browse the repository at this point in the history
  • Loading branch information
zjr2000 authored May 9, 2021
1 parent f8642ce commit 7a72e76
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ protected void setHeadCellStyle(Cell cell, Head head, Integer relativeRowIndex)

@Override
protected void setContentCellStyle(Cell cell, Head head, Integer relativeRowIndex) {
if (contentCellStyleList == null || contentCellStyleList.isEmpty()) {
if (contentCellStyleList == null || contentCellStyleList.isEmpty() || relativeRowIndex == null) {
return;
}

cell.setCellStyle(contentCellStyleList.get(relativeRowIndex % contentCellStyleList.size()));
}

Expand Down

0 comments on commit 7a72e76

Please sign in to comment.