PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.2k forks source link

read csv with long number data get scientific notation #1432

Open dpbuzz opened 5 years ago

dpbuzz commented 5 years ago

Hi, I have a CSV with one column to read with this data:

SerialNumber 8954310143063931904 8954310143063931938 8954310143063931920 8954310143063931912 8954310143063931896 8954310143063931516 8954310143063931540

I am doing: $inputFileType='Csv'; $objReader=IOFactory::createReader($inputFileType); $objWorksheet = $objPHPExcel->getActiveSheet(); $cell=$objWorksheet->getCellByColumnAndRow($col,$fila);

And $cell gets cientific notation like 8.9543101430639E+18 instead of 8954310143063931904 How can solve this problem and get de values as strings? Thanks