Writing into Excel sheet-- Writing into xlsx | Selenium Forum
M
Posted on 25/06/2016
I am able to read perfectly well from an excel sheet. But I have a NullPointer exception while its pointing to line number 67 or 196 from Xls_Reader.java. I verified those lines are using .getStringCellValue().trim() and equals () functions. It is giving Nulpointer exception. Some one needs to look into this make correction please.

java.lang.NullPointerException
at Xls_Reader.setCellData(Xls_Reader.java:196)
at Reading_XLS_Files.main(Reading_XLS_Files.java:28)
java.lang.NullPointerException
at Xls_Reader.setCellData(Xls_Reader.java:196)
at Reading_XLS_Files.main(Reading_XLS_Files.java:29)

M
Replied on 26/06/2016

make sure excel sheet has the data. you trying to access.