https://bz.apache.org/bugzilla/show_bug.cgi?id=63749
Bug ID: 63749
Summary: sheet.getLastRowNum() returns 0 when there are no rows
in the sheet
Product: POI
Version: 3.17-FINAL
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
When there are no rows created in the sheet, sheet.getLastRowNum() returns 0
but when there is 1 row created, sheet.getLastRowNum() also returns 0.
Shouldn't sheet.getLastRowNum() return -1 for sheet that has no rows?
This is causing issues when you try to create a new row based on the last row
number. Due to the above issue, the first row that gets created will start from
the 2nd row instead of the very top.
private Row row;
public void createRow() {
row = sheet.createRow(sheet.getLastRowNum() + 1);
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]