I'm using version 9, and I am looking into the formula evaluator with the 
signature:

int 
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator<eclipse-javadoc:%E2%98%82=SpreadSheet/war%5C/WEB-INF%5C/lib%5C/poi-ooxml-3.9-20121203.jar%3Corg.apache.poi.xssf.usermodel(XSSFFormulaEvaluator.class%E2%98%83XSSFFormulaEvaluator>.evaluateFormulaCell(Cell<eclipse-javadoc:%E2%98%82=SpreadSheet/war%5C/WEB-INF%5C/lib%5C/poi-ooxml-3.9-20121203.jar%3Corg.apache.poi.xssf.usermodel(XSSFFormulaEvaluator.class%E2%98%83XSSFFormulaEvaluator~evaluateFormulaCell~Lorg.apache.poi.ss.usermodel.Cell;%E2%98%82Cell>
 cell)

I evaluated a cell with the value Value 1 inside.  The method returned -1, much 
to my surprise.  The return values listed in the documentation are only valid 
values for Cell.getCellType(), i.e., CELL_TYPE_BLANK, CELL_TYPE_NUMERIC, 
CELL_TYPE_STRING, CELL_TYPE_FORMULA, CELL_TYPE_BOOLEAN, CELL_TYPE_ERROR.  None 
of these values evalute to -1.  They are zero-based.  This leads me to believe 
that return value of -1 means, "You can't do that!  The cell doesn't contain a 
formula!"

Since even I was able to figure this out, I'm not sure that it's all that 
important, but it sure kept me at work when I had every intention of baling 
early.

Comments?


David Crocker
Scientist
National Renewable Energy Laboratory
Integrated Biorefinery Research Facilities
MS 3512
16173 Denver West Parkway
Golden, CO 80401
303-384-6242
[email protected]



Reply via email to