Guys I\'m currently using the POI 3.9 library to work with excel files. I know of the getLastRowNum() function, which returns a number of rows in an Excel file.
getLastRowNum()
getLastRowNum() return index of last row.
So if you wants to know total number of row = getLastRowNum() +1.
I hope this will work.
int rowTotal = sheet.getLastRowNum() +1;