CSV,pdf, and html pre calculated formulas always 0?

Topics: Developer Forum, User Forum
May 23, 2008 at 5:02 PM
I have formulas and by default the doc says that it will pre-calculate the formula... only problem is it always returns a 0.

I tried adding: 
  $objWriter = new PHPExcel_Writer_PDF($objPHPExcel);

to see if maybe it was false by defualt,  but no luck I still get 0 ??  it works perfect in Excel2007 and Excel_5 just not the other 3...

May 26, 2008 at 6:22 AM
Does example 21pdf.php write formulas out?
Jun 3, 2008 at 5:38 PM

I'm running into this same problem. I tested 21pdf.php and it output everything correctly. The only differences i could see in the example file were the createTextRun and getText attributes.

Any help would be awesome. Thanks in advance,
Jun 4, 2008 at 1:18 PM
Can you guys post a sample snippet here + info on PHP version and PHPExcel version?
Jun 4, 2008 at 2:13 PM
PHPExcel - 1.6.1
PHP - PHP Version 5.2.0-8

Alright, keep in mind these all function perfectly in any Excel output.
 So there are roughly 6 Cells like this with SUMs that total to 0 in the PDF
    $objPHPExcel->getActiveSheet()->setCellValue('C'.(2+$Increment), '=SUM(C1:C'.(1+$Increment).')');
Totaling the $Increment cells above it

In the row below there is a static value applied for a multiplication cell beneath:
    $objPHPExcel->getActiveSheet()->setCellValue('C'.3+$Increment), '0.55');

And here's the multiplication formula which totals to 0:
    $objPHPExcel->getActiveSheet()->setCellValue('C'.(4+$Increment), '=C'.(2+$Increment).'*C'.(3+$Increment));

And the writer object
        $objWriter = new PHPExcel_Writer_PDF($objPHPExcel);

anything stand out?
Jun 5, 2008 at 7:13 PM
There is a slight chance this is the PHP version... Would it be possible to test this on 5.2.5, for example?
Jun 5, 2008 at 9:29 PM
I'll give it a shot soon, but .. why would the test PDF render properly?
I'll let you know the results.