Search code examples
phpphpexcelnumber-formatting

phpExcel write long number in cell


While writing the excel file is fine I see that really long numbers are formulas in excel

Example: 8.71129E+12

instead of: 1234567890

How can I change the format during the PHP Excel Creation?

I'm following the simple example here


Solution

  • $objPHPExcel->getActiveSheet()->setCellValueExplicit('A1', '1234567890', PHPExcel_Cell_DataType::TYPE_STRING);