And fabs[j] = new String(); should be deleted. It does nothing. You might do well to get rid of the assignment to null in line 13; that is another problem waiting to happen later on.
Joined: May 22, 2012
But you see this is these rows are 8th in list in the template i'm reading. I have same code for row1,row2,......,row7 before this one. But when i try to upload data from this excel sheet into my GUI, the error occurs at row8 (as i specified before). I am filling only row1 cells to be read and leaving all the remaining cells blank.
Why the error is not generated for row2,row3,.....row7?
row8[j].getCell(3) will return null if the cell is not defined (whatever that means). There are two quick fixes:
1) Check if row8[j] != null before using it.
2) Replace row8[j].getCell(3) with row8[j].getCell(3, Row.CREATE_NULL_AS_BLANK).