I cant see any mention of how to check if current cell is last row in a spreadsheet in java excel api docs...
When I use code and try to fetch data in next row (after the last row) I get an error-
I can trap this error and hence capture the scenario of having surpassed the last row, however I would like to know if there is some way of directly identifying if a row is the last row in excel sheet, when using java excel api?
For reference, the code that causes this error is given below -- (The exact line that causes the error is the 3rd line in code below)--
// now go to next value of url in the spreadsheet...
rownum++;
datacell=sheet.getCell((columnread-1), rownum );
For reference, the error I get is --
java.lang.ArrayIndexOutOfBoundsException: 7
at jxl.read.biff.SheetImpl.getCell(SheetImpl.java:356)
at com.arvind.dataentry.Dataentry.process_file(Dataentry.java:245)