phpExcel reader long numbers to text -
when reading excel file, have problems numbers greater length:
i use:
try { $inputfiletype = phpexcel_iofactory::identify($inputfilename); $objreader = phpexcel_iofactory::createreader($inputfiletype); $objphpexcel = $objreader->load($inputfilename); } catch(exception $e) { die('error loading file "'.pathinfo($inputfilename,pathinfo_basename).'": '.$e->getmessage()); } $sheet = $objphpexcel->getsheet(0); $highestrow = $sheet->gethighestrow(); $highestcolumn = $sheet->gethighestcolumn(); ($row = 1; $row <= $highestrow; $row++){ $obj = $sheet->rangetoarray('a' . $row . ':' . $highestcolumn . $row, null, true, false); list($code, $name) = $obj[0]; echo $code; }
and returns 1.6364698338384e+18
is possible obtain 1636469833838380000 ?
i try
$code = (string) floatval($code);
... nothing...
you can change cell format text in excel file , try reading values it.
hope helps.
Comments
Post a Comment