You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Leonardo Mira <le...@gmail.com> on 2008/03/31 16:04:29 UTC

Formulas and Excel Viewer

Hi,

I am using POI to generate a XLS sheet containing several formulas for a BI
based application.
The XLS generated works perfectly well
on OpenOffice and also on Microsoft Office. But in Excel Viewer not even
a simple formula (1+1) is shown correctly.
So far, I think that the problem resides in how Excel Viewer does (not)
evaluates formulas, because if the file is open and then saved (no changes
made) in OpenOffice or Microsoft Office then everything works fine in
Viewer.
A co-worker told me that Excel uses
a "cache" for the formulas result, witch make me believe that Excel
Viewer simply does not evaluates formula, so is always need to call
HSSFCell.setCellValue() to set the formula result. In my case this is not a
problem since a always have the value before the creation of the formula.

I would like to confirm the behavior, or if there is something else
that could be done, besides
HSSFCell.setCellValue() or HSSFFormulaEvaluator.


Thanks in advance,
Leonardo Mira