Bug 57985

Summary: setRepeatingRows not working with merged rows
Product: POI Reporter: John Claxton <jclaxton>
Component: SS CommonAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 3.11-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Print previews

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);

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