phpExcel - Excel found unreadable content when use formula? -
i wrote code when open excel file had error "excel found unreadable content". here code
$i=8 $objphpexcel->getactivesheet()->setcellvalue('f'.$i,'=d.$i*e.$i'); $i++;
where mistake? thank you!
your mistake single quotes ('
), means php won't interpolate variables inside string, , you're not breaking out of string concatenation.
use double quotes ("
) without trying concatenate:
"=d{$i}*e{$i}"
or concatenate:
'=d'.$i.'*e.'$i
Comments
Post a Comment