robins robins - 11 months ago 86
PHP Question

setCellValue in phpExcel

I want to export a report to excel.Now its little okey.I'm stuck in setCellValue.
Take all the values using loop.In final,after looping i want a Sum row.That is the sum of all columns.


$row = 2;
$no = 1;
foreach($p_det as $n){



i add this last line my export is not working

Please help me


Rewrite the line


With the below one


It will work

With the (), it will clearly extract the single numeric value. With out the parenthesis, it may make issues.