Feb 17, 2015 at 2:25 PM
Edited Feb 17, 2015 at 3:29 PM
I'm not sure when this started happening but I assume it was when I upgraded PHPExcel and PHP on my servers.
This was working before, but now when I try to use the 2007 writer to create an .xlsx file, all of the formulas are displaying zero. They will correct themselves if I update the field with slightly different information (start at B2 instead of B1 for instance)
and this is across LibreOffice, Mac Preview, OpenOffice, and Word 2013. The Word 2013 users have gotten around it by re-saving the file from their app and re-opening it, then the formulas display correctly.
Simple example below:
/ A3 will display as 0 instead of 30, and when it does display, it's left aligned, might be a clue
$EXCEL = new PHPExcel();
$SHEET = $EXCEL->getActiveSheet();
$WRITER = PHPExcel_IOFactory::createWriter($EXCEL, 'Excel2007');
I just tried with my last rev of PHPExcel which was 1.7.1 and the problem persists, so it's something to do with PHP 5.6.3 (formerly I was on 5.2.17).
Later today I'll try turning Warnings on on the logging and see if anything jumps out at me.