提交 0de3e57d 编写于 作者: 庄家钜's avatar 庄家钜

* 修复复杂表头不是`index=0`开始 合并异常的bug #1322

上级 98ec9f80
......@@ -66,7 +66,8 @@ public class ExcelWriteHeadProperty extends ExcelHeadProperty {
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);
......@@ -180,7 +181,8 @@ public class ExcelWriteHeadProperty extends ExcelHeadProperty {
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;
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册