Skip to content

Commit

Permalink
edit code in example 03 to attempt to reproduce our problems with Exc…
Browse files Browse the repository at this point in the history
…el export using the lib's own example code.
  • Loading branch information
GerHobbelt committed Dec 6, 2013
1 parent 7a90c5b commit 7d6f6e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Examples/03formulas.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
->setCellValue('B2', 3)
->setCellValue('B3', 7)
->setCellValue('B4', 13)
->setCellValue('B5', '=SUM(B2:B4)');
->setCellValue('B5', '=B2+B3+B4');
//->setCellValue('B5', '=SUM(B2:B4)');

$objPHPExcel->getActiveSheet()->insertNewRowBefore(1, 1); // insert row --> BREAKs the formula at B5 (now B6)

echo date('H:i:s') , " Sum of Range #1 is " ,
$objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue() , EOL;

Expand Down

0 comments on commit 7d6f6e0

Please sign in to comment.