Skip to content

Commit

Permalink
fix: include last row of grid in exported excel file
Browse files Browse the repository at this point in the history
Close #85
  • Loading branch information
flang authored and paodb committed Dec 21, 2023
1 parent cc90949 commit b614f8d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@ private int fillData(
Row newRow = sheet.createRow(startingCell[0].getRowIndex() + 1);
startingCell[0] = newRow.createCell(startingCell[0].getColumnIndex());
startingCell[0].setCellStyle(cellStyle);
// update the data range by updating last row
dataRange.setLastRow(dataRange.getLastRow() + 1);
}
// update the data range by updating last row
dataRange.setLastRow(dataRange.getLastRow() + 1);
buildRow(t, sheet, startingCell[0]);
notFirstRow[0] = true;
});
// since we initialized the cell range with the data placeholder cell, we use
// the existing 'getLastColumn' to keep the offset of the data range
dataRange.setLastColumn(dataRange.getLastColumn() + exporter.getColumns().size() - 1);
return startingCell[0].getRowIndex();
return dataRange.getLastRow();
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit b614f8d

Please sign in to comment.