Search code examples
phpexcelyii2phpexcelexport-to-excel

How to set PHPExcel_Cell_DataType::TYPE_STRING in krajee yii2-export


I meet a problem - when I export excel by Krajee yii2-export it will change long number to scientific notation in which lost last two bits. For example 201210171530 will be 2.012E+12, when I click it, 2.012E+12 will display as 201210171500. The last two bit '30' is lost,because '30' change to be '00'

How can I fix it? Or where can I set the cell datatype?
enter image description here


Solution

  • I solved the problem in a way. I add prefixion '. any good method? enter image description here