Hi Kaye,

The reason why your values are not updated is sadly simple:
the getValue() method returns the value stored in the document,
this value is calculated by your spreadsheet editor (OpenOffice Calc).

If you are looking for something like:
sheet.getCellAt("B2").setValue("=sum(B3:B4)");
sheet.getCellAt("B3").setValue("1");
sheet.getCellAt("B4").setValue("2");
to get the right result, we will have to implement all the logic and known formulas to be able to use something like sheet.getCellAt("B2").getComputedValue() in order to return 3 ... it's a big development that will transform jOpenDocument into a big calculator :)

If you have ideas to quickly implement a solution, you are welcome !

Regards,
Guillaume




Hi,

I've been reading your documentation for a few days now. But I'm
having one problem. I created a template.ods and set cell B2 with a
formula of =sum(B3:B4). I have already set the sample values on B3
(which is 5) and B4 (which is 2), what I need to get is the computed
value on B2. (expected return value is 7). but everytime I try to
access B2 by using..

sheet.getCellAt("B2").getValue();

it always returns the value 0.0 (but on the spreadsheet cell B2
contains the value 7). But when I try to get the value on B3, it
returns 5.0 (which is correct). Why is it like this? Am I not using
the correct code? Sample syntax please?

Your reply is very much appreciated. Thanks in advance! :)

More power to you guys.

Thanks,
Kaye

Reply via email to