Hi Miguel,

when just reading an existing Excel document I found it sufficient to just
read the value without evaluating.
Perhaps this is ok for you too

case HSSFCell.CELL_TYPE_FORMULA:
  String cellFormula = cell.getCellFormula();
  Double numericCellValue = cell.getNumericCellValue();
  if (numericCellValue.isNaN())
    System.out.println(cell.getRichStringCellValue().toString());
  else
    System.out.println(numericalCellValue);
  break;

To be honest I didn't quite got the purpose of evaluation cell values.
Wouldn't it be sufficient to put a formula in the cell and let the client
program evaluate it when opening some created doc?


HTH,
Axel.

Reply via email to