Here is my excel file
I will read excel from top to down, and will start to read from row 4 and write data into database.
Here is my code snippet:
But, apply this approach it will read from row 5. Because of the first row is null, Apache POI will skip empty row.
Utilize for-loop instead of while-loop, then it will not skip empty row: