-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getDateCellValue not working as desired. #14
Comments
Judging from the stacktrace, the cell value is null when that error occurs. There should always be an error in that case (though it could certainly be made clearer). Are you sure the sheet has a value there? If so, can you post an example file? |
Yes you are correct .The cell value is empty.So how one can handle this scenario.I think currently this method is not able to handle null condition. |
Looks like the way I wrote this technically violates the terms of the interface:
So, it should just return a null unless the value is not parseable. |
Returning null on blank cells when calling getDateCellValue() (#14)
I am reading an excel's column whose format is Date.
row.getCell(54).getCellType() -->(showing 3)
row.getCell(54).getDateCellValue() ;
giving me Following Runtime Exception.
Exception in thread "main" java.lang.NullPointerException
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at com.monitorjbl.xlsx.impl.StreamingCell.getNumericCellValue(StreamingCell.java:130)
at com.monitorjbl.xlsx.impl.StreamingCell.getDateCellValue(StreamingCell.java:143)
The text was updated successfully, but these errors were encountered: