https://bz.apache.org/bugzilla/show_bug.cgi?id=61082
Bug ID: 61082
Summary: getLastRowNum is misleading / unclear
Product: POI
Version: 3.16-FINAL
Hardware: Macintosh
OS: other
Status: NEW
Severity: enhancement
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
In a layman POV,
If I want to find to the first empty row(=getLastRowNum + 1), I would have
called this method.
by empty, I mean the row appears to be empty (or in POI language, cell type
BLANK) if you open the xlsx with excel. It doesnt matter whether the cell has
been created or not.
The current problem is, if you have used a cell but then deleted the content
(that means it is blank now), that cell was created in the xlsx and
getLastRowNum will not consider that as the "last row".
I call that those created but blank or empty cells, "invisible cells"
Suggestion:
1. upadate the javadoc to warn developer about this (because the current
lastRow wording is misleading that people would think last row = last row that
is not blank but current implementation is, last row = the largest row Number
among the created cells in xlsx)
2. make a new method to do find the right "last row"
the new method could be called
getFirstBlankRowNum(column findWhichCol, row startAtRow)
,which is, find the first blank cell's rowNum or return the current
getLastRowNum if all the cells were not blank
I know I am not a good explainer, please let me know if you want to know more
or want to recruit someone to achieve this (I am looking for chances to do
my-first-open-source-project)
--
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]