Warning: Could not merge cells C9D9 as they clash with an existing set of merged cells.

在使用jxl api进行合并excel的单元格的时候,
已经合并过的单元格就不能再跟其他单元格合并了,否则就是会有警告的。
例如

Warning: Could not merge cells C9-D9 as they clash with an existing set of merged cells.
警告说明很清楚。
说不能合并C9-D9的单元格。因为已经有单元格存在一系列被合并的单元格了。

像下面这样写是不行的。

writableSheet1.mergeCells(2, 8, 2, 9);
writableSheet1.mergeCells(2, 8, 3, 8);

要写就这样写。

writableSheet1.mergeCells(2, 8, 3, 9);
一行代码搞定。


————————————————
版权声明:本文为CSDN博主「搬砖男子汉」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u013803262/article/details/72935011

原文地址:https://www.cnblogs.com/javalinux/p/15702774.html