0

I'm trying to get a date (PHPExcel Format) from the cell (C24), but what I'm getting just this:

The cell (C24) has the following formula: =G2-(WEEKDAY(G2)-2)

echo "Calc Value:".$phpExcel->getActiveSheet()->getCell('C24')->getCalculatedValue()."\n";
echo "Format Value:".$phpExcel->getActiveSheet()->getCell('C24')->getFormattedValue()."\n";
echo "Value:".$phpExcel->getActiveSheet()->getCell('C24')->getValue()."\n";
echo "Value:".$phpExcel->getActiveSheet()->getCell('C24')->getOldCalculatedValue()."\n";

//Output:
Calc Value:#VALUE!
Format Value:#VALUE!
Value:=G2-(WEEKDAY(G2)-2)
Value:

I expected to get the PHPExcel Date Format, something like '48223'.

Any idea?

Thanks!

jbernardo
  • 161
  • 1
  • 4
  • 14

0 Answers0