when i set a cell value like this
->setCellValue('O' . $currentRow, 12000000000000111702)
or
->setCellValue('O' . $currentRow, "12000000000000111702")
it is generating values 1.2E+19 i.e 12000000000000000000
can anyone tell me the reason ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need this value to be retained exactly “as is” rather than converted to a float (because it’s too big for a PHP int), then you’ll need to set the value explicitly as a string using
You don’t actually need to specify PHPExcel_Cell_DataType::TYPE_STRING because setCellValueExplicit() defaults to that anyway.