My code uses the getFormattedValue() method to pull the data into PHP.
Here is the problem part of .xls with "numbers stored as text" at column D:
Excel cells contains next values: D7 -> 0,43; E7 -> =D7*1,2; F7 -> =E7*11,2;
getFormattedValue() returns: 0,43; #VALUE!; #VALUE!;
getCalculatedValue() also returns 0,43; #VALUE!; #VALUE!;
getValue() returns 0,43; D7*1.2; E7*11.2;
If I fix it in excel, as it propose, to number. then getFormattedValue() work just fine. But I can't tell to client that your xls is wrong...
So question, is it possible get PHPExcel to act like Excel? Or maybe some other method to make this work.
Thank you for your help and time!
--- EDIT 1 ---
Basicly it's a comment to Mark Baker's answer.
I would like to find a solution that doesn't include any changes to .xls files. I don't know what structure it would be, where is the problem cells, etc.
Is there some way to make PHPExcel recognize that cells? Maybe how MS Excel do that? Or find out our method to do that.
I think about trying to divide cell value by itself and if we get 1 so that's a numeric cell. AND\OR find cells that are included in mathematical calculations. To better understand what i mean - cell E7 contains D7*1,2. So, we can check - is D7 numeric? Something like that.
At this time I don't have any solution to this problem... So any help would be great.