Skip to content

Commit

Permalink
* 修复复杂表头不是index=0开始 合并异常的bug #1322
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuangjiaju committed May 25, 2020
1 parent 98ec9f8 commit 0de3e57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public ExcelWriteHeadProperty(Holder holder, Class headClazz, List<List<String>>
Integer index = entry.getKey();
ExcelContentProperty excelContentPropertyData = entry.getValue();
if (excelContentPropertyData == null) {
throw new IllegalArgumentException("Passing in the class and list the head, the two must be the same size.");
throw new IllegalArgumentException(
"Passing in the class and list the head, the two must be the same size.");
}
Field field = excelContentPropertyData.getField();
Head headData = getHeadMap().get(index);
Expand Down Expand Up @@ -180,7 +181,8 @@ public List<CellRange> headCellRangeList() {
if (j == lastRow && i == lastCol) {
continue;
}
cellRangeList.add(new CellRange(j, lastRow, i, lastCol));
cellRangeList
.add(new CellRange(j, lastRow, head.getColumnIndex(), headList.get(lastCol).getColumnIndex()));
}
}
return cellRangeList;
Expand Down
1 change: 1 addition & 0 deletions update.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* 修复多个`sheet`不按照顺序写入 会乱序的bug [Issue #1332](https://github.com/alibaba/easyexcel/issues/1332)
* 修改head是List时,内容单元格的样式不生效 [Issue #1339](https://github.com/alibaba/easyexcel/issues/1339)
* 新增写入`class``list`同时传入 `field`数量不一致报错 [Issue #1333](https://github.com/alibaba/easyexcel/issues/1333)
* 修复复杂表头不是`index=0`开始 合并异常的bug [Issue #1322](https://github.com/alibaba/easyexcel/issues/1322)


# 2.2.3
Expand Down

0 comments on commit 0de3e57

Please sign in to comment.