i want use "replace" formula set value in excel. code generates more 16 digit number not able write in phpexcel. (excel not support write more 16 digits number, convert last digit 'zero'. if want add 16 digit number, need convert number type text). use concat function in mysql returns me 1234567890123456 digit number '1234567890123456
when generate excel file return single quote attach excel. assume replace function useful.
$id = "'1234567890123456"; $objphpexcel->getactivesheet()->setcellvalue('a2', '=replace("'.$id.'"|1|1|)');
it doesn't work @ all. doing wrong?
it's possible write large numeric values in phpexcel strings, without having resort using formulae:
$id = "1234567890123456"; $objphpexcel->getactivesheet() ->setcellvalueexplicit('a2', $id);
setcellvalue() set datatype cell numeric; setcellvalueexplicit() allows specify datatype third argument - defaults phpexcel_cell_datatype::type_string, in case don't need pass argument
Comments
Post a Comment