diff --git a/src/documentation/content/xdocs/hssf/eval.xml b/src/documentation/content/xdocs/hssf/eval.xml index 197391b381..1416ad7c29 100644 --- a/src/documentation/content/xdocs/hssf/eval.xml +++ b/src/documentation/content/xdocs/hssf/eval.xml @@ -39,8 +39,9 @@ being supported fairly frequently. + +
Status -

The code currently provides implementations for all the arithmatic operators. It also provides implementations for approx. 100 built in functions in Excel. The framework however makes is easy to add @@ -55,8 +56,9 @@ in the context of other POI excel reading code.

There are two ways in which you can use the HSSFFormulaEvalutator API.

+ +
Using HSSFFormulaEvaluator.<strong>evaluate</strong>(HSSFCell cell) - FileInputStream fis = new FileInputStream("c:/temp/test.xls"); HSSFWorkbook wb = new HSSFWorkbook(fis); @@ -98,10 +100,10 @@ switch (cellValue.getCellType()) { a simple value object and does not maintain reference to the original cell.

-
+ +
Using HSSFFormulaEvaluator.<strong>evaluateInCell</strong>(HSSFCell cell) -

evaluateInCell(HSSFCell cell) will check to see if the supplied cell is a formula cell. If it isn't, then no changes will be made to it. If it is, then the @@ -142,8 +144,9 @@ if (cell!=null) { }

+ +
Re-calculating all formulas in a Workbook - FileInputStream fis = new FileInputStream("/somepath/test.xls"); HSSFWorkbook wb = new HSSFWorkbook(fis); @@ -168,8 +171,8 @@ wb.write(new FileOutputStream("/somepath/changed.xls"));
+
Performance Notes -
  • Generally you should have to create only one HSSFFormulaEvaluator instance per sheet, but there really is no overhead in creating