Bug 58070

Summary: [PATCH] Can't add two merge cells which overlap
Product: POI Reporter: nicedelamontagne
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 3.12-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: To reproduce bug
Patch file

Description nicedelamontagne 2015-06-22 19:34:45 UTC
Created attachment 32849 [details]
To reproduce bug

I create a file and I need to merge cells. After I need to merge a second time with 2 new columns. 

When you open the file xlsx there is an error's message and Excel need to repair the file. In fact, the second merge is deleted.

The problem doesn't exist with HSSF.
Comment 1 Michiel 2015-07-14 15:59:09 UTC
Looks like the method should merge any merged cell ranges that overlap. At least that seems to be the behavior in Excel itself.
Comment 2 Michiel 2015-07-15 21:40:47 UTC
Created attachment 32906 [details]
Patch file

This patch aims to merge overlapping merged regions so that Excel does not consider the file to be corrupt.
Comment 3 David North 2015-10-29 10:55:06 UTC
Thanks for the patch. Please can you supply some unit tests to demonstrate what didn't work previously and now does?
Comment 4 Javen O'Neal 2015-10-31 12:11:52 UTC
I think this is a duplicate of bug 58443. I deployed the fix for that bug to trunk. Could you test your code against a nightly build of POI (the first build with the fix is #924).
Comment 5 Javen O'Neal 2015-12-29 06:08:12 UTC
No response for several months. I assume that this was fixed with bug 58443. Please reopen if this problem has not been resolved.

*** This bug has been marked as a duplicate of bug 58443 ***