Hi
I've followed the example given in
http://jakarta.apache.org/poi/hssf/eval.html to use
HSSFFormulaEvaluator.evaluate but a NullPointerException is thrown.
The same problem is described in
http://article.gmane.org/gmane.comp.jakarta.poi.devel/9767/.
Using the solution Amol gives in that message everything works fine.
Here is a diff to the docs to add the missing line:
Index: src/documentation/content/xdocs/hssf/eval.xml
===================================================================
RCS file:
/home/cvspublic/jakarta-poi/src/documentation/content/xdocs/hssf/eval.xml,v
retrieving revision 1.3
diff -u -r1.3 eval.xml
--- src/documentation/content/xdocs/hssf/eval.xml 24 May 2005
14:23:03 -0000 1.3
+++ src/documentation/content/xdocs/hssf/eval.xml 20 Oct 2005
19:43:32 -0000
@@ -46,6 +46,7 @@
CellReference cellReference = new CellReference("B3");
HSSFRow row = sheet.getRow(cellReference.getRow());
HSSFCell cell = row.getCell(cellReference.getCol());
+evaluator.setCurrentRow(row);
HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell);
switch (cellValue.getCellType()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/