Summary: | Cannot get a numeric value from a error formula cell | ||
---|---|---|---|
Product: | POI | Reporter: | Harisingh Rajput <harisingh.rajput> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Harisingh Rajput
2016-01-16 13:44:57 UTC
For formula cells, you need to check the cached formula result type, and fetch the cell's value based on that - https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html#getCachedFormulaResultType%28%29 . You cannot blindly fetch the numeric value for formula cells, as many formulas don't resolve to numbers, eg they give a String or an Error (as in your case) |