Coordinator
Feb 10, 2011 at 8:31 AM
Edited Feb 10, 2011 at 8:32 AM

$value = $objPHPExcel>setActiveSheetIndex(0)>getCell('G'.$i)>getValue();
Will return the actual formula if the cell contains a formula, or the value if the cell contains a value.
$value = $objPHPExcel>setActiveSheetIndex(0)>getCell('G'.$i)>getCalculatedValue();
Will return the calculated value if the cell contains a formula, or the value if the cell contains a value.
$value = $objPHPExcel>setActiveSheetIndex(0)>getCell('G'.$i)>getOldCalculatedValue();
Will return the previous result of a calculation if the cell contains a formula, or the value if the cell contains a value.
However  Note that when you save a workbook in MS Excel itself, it calculates the result for all formulae and stores the result in the workbook. This is the result returned by getOldCalculatedValue(). However, not all spreadsheet programs
do this: OOCalc does; Gnumeric doesn't; Multiplan (SYLK) or CSV files don't hold this old calculated value either. If the loaded workbook hasn't done this calculation on save, then getOldCalculatedValue() will return a null.
