Bug 57985 - setRepeatingRows not working with merged rows
Summary: setRepeatingRows not working with merged rows
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.11-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-01 19:43 UTC by John Claxton
Modified: 2019-01-06 13:00 UTC (History)
0 users



Attachments
Print previews (9.58 KB, image/png)
2015-06-01 19:43 UTC, John Claxton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Claxton 2015-06-01 19:43:12 UTC
Created attachment 32773 [details]
Print previews

Sheet.setRepeatingRows() isn't worked when you try to use it with merged rows. Only the top row of a set of merged rows is being printed (see attached pictures). 

The issue came up when I replaced this code (which is deprecated):
myWorkbook.setRepeatingRowsAndColumns(myWorkbook.getSheetIndex(mySheet), 0, rowHeaderColCount - 1, 0, freezeRow - 1);

With this code:
CellRangeAddress ca = new CellRangeAddress(0, rowHeaderColCount - 1, 0, freezeRow - 1);
mySheet.setRepeatingRows(ca);
mySheet.setRepeatingColumns(ca);

setRepeatingRowsAndColumns() behaves correctly. Using the later code, when I print from Excel, the merged rows are cut off after the first page.