Excel5 iferror formla

Topics: Developer Forum
Dec 26, 2014 at 7:43 AM
dear all

please help me with this
i wanna sum

$l = 14;
foreach ($items as $row) {
        $options = $this->cart->product_options($row['rowid']);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('P' . $l, '=IFERROR(60'.'/'.'(G'. $l.'*H'. $l.'*I'. $l.'/'.'1000000)',0)');

but i have error like this below

Parse error: syntax error, unexpected '') ' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\model.php on line 1063

please can any can explain?

thank you before for all reply.

best regards,

udin
Coordinator
Dec 26, 2014 at 9:53 AM
Edited Dec 26, 2014 at 9:57 AM
Try removing the erroneous , immediately after '1000000)

This isn't a PHPExcel error, it's just a simple syntax error in your PHP script
Dec 26, 2014 at 11:16 AM
dear MarkBaker


i've already remove the erroneous , it works, but the P cell in excel file still not show nothing.

by the way thank you for the answer.

best regards,


udin