Bug 53472 - RegionUtil Borders Lost Under Certain Conditions.
Summary: RegionUtil Borders Lost Under Certain Conditions.
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC Windows Vista
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2012-06-26 19:53 UTC by Alan Hay
Modified: 2012-06-26 20:19 UTC (History)
0 users

Example to recreate the issue. (4.28 KB, application/octet-stream)
2012-06-26 19:53 UTC, Alan Hay

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Hay 2012-06-26 19:53:03 UTC
Created attachment 28999 [details]
Example to recreate the issue.

Kind of hard to explain but can be clearly seen by running the attached example.

If a merged region is added to the workbook which spans multiple rows and these rows have not yet been added via sheet.createRow(), the borders around the merged region are lost when a row is added to the sheet with the same row index as the lower bound of the merged region.

Affects both HSSF and XSSF workbooks.

Creating the merged region after all rows have been added shows the expected behaviour.
Comment 1 Alan Hay 2012-06-26 20:19:25 UTC
Okay, excuse my stupidity.

There is no need to call createRow() after the merge as the rows have already been inserted by the merge operation.