My code is as follows:
row = sheet.createRow((short) 81);
cell = row.createCell((short) 2);
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(sheet, wb);
evaluator.setCurrentRow(row);
cell.setCellFormula("COUNTIF(D81:Z81,\"<65\")");
String formula = cell.getCellFormula();
if (cell != null && cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA){
if (formula != null)
evaluator.evaluateInCell (cell);
}//end if
And I am getting the following error:
java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFCell: method
getRichStringCellValue()Lorg/apache/poi/hssf/usermodel/HSSFRichTextString;
not found
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.getEvalForCell(HSSFFormulaEvaluator.java:554)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:426)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateInCell(HSSFFormulaEvaluator.java:286)
Has anyone encountered this? Also, could someone point me in the right
direction to simply allowing the COUNTIF function to work properly from POI
to excel?
Thanks,
Smitty
--
View this message in context:
http://www.nabble.com/HSSFFormulaEvaluator-tp16255683p16255683.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]