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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -