You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rudolf Schmidt <we...@gmx.de> on 2008/05/30 08:57:58 UTC
Wrong result with formulas including $-sign using evaluator.evaluate(cell)?
Hi,
evaluator.evaluate(cell) gives me wrong results, if it evaluates
cellformulas, that have $-signs in it or refer to cells which have formulas
with $, e.g. "C$12 * a3". Removing the $ helps, but is not always possible.
Any suggestions?
Snippet:
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(sheet, wb);
evaluator.setCurrentRow(row);
HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(cell);
return cellValue.getNumberValue();
Regards, Rudolf
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Wrong result with formulas including $-sign using evaluator.evaluate(cell)?
Posted by Tim Wilkins <ti...@mediatel.co.uk>.
Have been looking for something like this, but the site appears to be
down :(
Peter Arrenbrecht wrote:
> On Fri, May 30, 2008 at 8:57 AM, Rudolf Schmidt <we...@gmx.de> wrote:
>
>> Hi,
>>
>> evaluator.evaluate(cell) gives me wrong results, if it evaluates
>> cellformulas, that have $-signs in it or refer to cells which have formulas
>> with $, e.g. "C$12 * a3". Removing the $ helps, but is not always possible.
>>
>> Any suggestions?
>>
>
> Shameless plug: http://formulacompiler.org/ (GPLed Excel to JVM byte
> code compiler)
> -parren
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Wrong result with formulas including $-sign using evaluator.evaluate(cell)?
Posted by Peter Arrenbrecht <pe...@gmail.com>.
On Fri, May 30, 2008 at 8:57 AM, Rudolf Schmidt <we...@gmx.de> wrote:
> Hi,
>
> evaluator.evaluate(cell) gives me wrong results, if it evaluates
> cellformulas, that have $-signs in it or refer to cells which have formulas
> with $, e.g. "C$12 * a3". Removing the $ helps, but is not always possible.
>
> Any suggestions?
Shameless plug: http://formulacompiler.org/ (GPLed Excel to JVM byte
code compiler)
-parren
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org