php - PHPExcel VLOOKUP not appearing -


i'm trying use phpexcel vlookup , sheet getting no formula appearing in cell. using formula, sum(), works fine.

so i've programmatically created bunch of sheets. here's dummy sheet i'm testing:

$newsheet = $objphpexcel->createsheet(); $lytabname = ($year-1).' wk '.$thisweeknum.' input data'; $newsheet->settitle($lytabname); $objphpexcel->setactivesheetindexbyname($lytabname); $objphpexcel->getactivesheet()->setcellvalue(a6,'00009'); $objphpexcel->getactivesheet()->setcellvalue(e6,'100'); 

if go first sheet:

 $objphpexcel->setactivesheetindex(0); 

then works:

$objphpexcel->getactivesheet()->setcellvalue('d6', '=sum(\''.$lytabname.'\'!a6:a7)'); 

but doesn't, cell d6 on first sheet empty

$objphpexcel->getactivesheet()->setcellvalue('d6', '=vlookup(a6,\''.$lytabname.'\'!a6:a7,5,false)'); 

i want formula in cell because want paste data dummy sheet right , have vlookup job in resulting xls. i'm using phpexcel 1.8.0 , excel5 i.e.

$objwriter = phpexcel_iofactory::createwriter($objphpexcel, 'excel5'); $objwriter->settempdir($server_path.'tmp'); $objwriter->save('php://output'); 

what doing wrong here?


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -