Bug 59278 - Inconsistent behavior for Cell.getErrorCellValue on blank cells
Summary: Inconsistent behavior for Cell.getErrorCellValue on blank cells
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.15-dev
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2016-04-06 08:37 UTC by Javen O'Neal
Modified: 2016-10-20 20:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2016-04-06 08:37:10 UTC
Consistency between HSSFCell, XSSFCell, and SXSSFCell:

HSSFCell throws an error on blank cells despite the javadocs saying 0 is returned. 
XSSFCell throws an error on blank cells.
SXSSFCell returns 0 on blank cells.

If we upgrade getErrorCellValue() from returning a byte to a FormulaError enum, then we would either need to add an enum value corresponding to "no error" or make the functions throw type mismatch (InvalidStateException) like the other cell types. I'm in favor of making SXSSFCell behave the same as HSSFCell and XSSFCell here and updating the documentation.
Comment 1 Nick Burch 2016-04-06 08:57:03 UTC
I think that fetching an error value from a non-error cell should behave like fetching a string value from a non-string cell. So, I'd vote for updating the javadocs and having the InvalidStateException in SXSSF