I'm trying to get non-blank number of cells in a row.
| 1 | 2 | 3 | | | |
| 55 | 33 | | | | |
with (int) row.getLastCellNum();
But for both rows I'm getting an int that is bigger than the number of cells that actually have values in my sheet. What could be the reason for this? Can cell formatting and/or styling be somehow responsible?
I've also noticed that if I delete values from excel sheet (manually, not from code), poi still considers them as non-blank(null?) and includes them in total count.
UPD: after a bit more research I've found that if I add value to a cell and then delete it, then POI still considers it non-empty. Is there any way to properly clear cell contents in excel sheet without deleting entire row/column?