I need to determine if a row in excel sheet is empty or not without iterating over whole row.
Iterating over row to determine if whole row is empty and then reading that row to get all data will increase the time of file reading operation as I need to deal with huge files.
Existing solution in foll. articles require iterating over whole row.
How to determine empty row?
Checking for empty row in excel using apache poi methods
Please suggest an efficient way to fulfill this use case
Update: is empty means no values
row.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.should help you, though I am not sure what happens if lets say, we set a value to A1 and then remove it, if the cell is still defined or not