Problem with getCalculatedValue if executed first.

Topics: Developer Forum
Sep 3, 2010 at 9:21 AM


I have a problem with getCalculatedValue method, if I open a workshet then start my process by a getCell("C4")->getCalculatedValue() (for example - C4 is a cell with a formula inside), the method return :

Cell C4 value is a s with a value of
Cell C4 has no value, formula or otherwise

But before execute my getCalculatedValue, if I call a getCell("B4")->getValue() (B4 is a cell with only a value inside), then just after obtaining the result I call getCell("C4")->getCalculatedValue(), in this case I get the correct result :

Cell C4 value is a f with a value of =IF(B4<35,1,IF(B4>=45,3,2))
Cell value for C4 is a formula: Calculating value

Something wrong in the PHPExcel code, or do I need to previously configure something before call getCalculatedValue().

Could you help me.


Sep 3, 2010 at 9:47 AM


For this unnecessary post.

I found my mistake, the worksheet was not correctly initialized.

Ignore my previous message