You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use a counter variable to count the row.next(), but the tradeoff is that you need to iterate over the sheet, and "exhaust" the rowIterator object. See #97 if your need is to reuse it. One issue is that the row iterator skips empty rows.
I am getting correct row count if there are two or more sheets but getting always 0 if there is only one sheet. I am executing this code.
Sheet sheet = workbook.getSheet(sheetName);
int rowCount = sheet.getLastRowNum();
Please suggest some solution.
Regards,
Mubashar Ahmad
The text was updated successfully, but these errors were encountered: