You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/02/06 10:24:36 UTC
[Bug 59740] [PATCH] Sheet.shiftRows incorrectly shifts merged region
on exists merged region
https://bz.apache.org/bugzilla/show_bug.cgi?id=59740
David Le Niniven <da...@amalto.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #7 from David Le Niniven <da...@amalto.com> ---
The shiftRows method works as expected if we shift only one row at a time, but
if we try to shift several rows in a single call, it removes all merged areas
for the shifted rows.
For instance, if we have a Xlsx document with 2 merged cells A3:B3
Assuming lastRowNum = sheet.getLastRowNum();
Executing the following code will removed this merged region :
sheet.shiftRows(1, lastRowNum+1, -1, true, false);
Whereas the following code will keep the shift the merged region into A2:B2
for(int currentRow = 1; currentRow <=lastRowNum+1; currentRow++) {
sheet.shiftRows(currentRow, currentRow, -1, true, false);
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org