问题
What is the difference between row.getLastCellNum()
and row.getNoOfPhysicalCell()
in POI HSSFRow ? Or are they same ?
回答1:
getLastCellNum()
Gets the index of the last cell contained in this row PLUS ONE
getPhysicalNumberOfCells()
gets the number of defined cells (NOT number of cells in the actual row!). That is to say if only columns 0,4,5 have values then there would be 3.
来源:https://stackoverflow.com/questions/18201381/apache-poi-difference-between-row-getlastcellnum-and-row-getnoofphysicalcell