RowRecord rowRecord = this.getRow( row );
int level = rowRecord.getOutlineLevel();
int currentRow = row;
- while (this.getRow( currentRow ) != null) {
+ while (currentRow >= 0 && this.getRow( currentRow ) != null) {
rowRecord = this.getRow( currentRow );
if (rowRecord.getOutlineLevel() < level) {
return currentRow + 1;
wb.close();
}
+
+ @Test
+ public void test50319() throws IOException {
+ Workbook wb = new HSSFWorkbook();
+ Sheet sheet = wb.createSheet("Test");
+ sheet.createRow(0);
+ sheet.groupRow(0, 0);
+ sheet.setRowGroupCollapsed(0, true);
+
+ sheet.groupColumn(0, 0);
+ sheet.setColumnGroupCollapsed(0, true);
+
+ wb.close();
+ }
}