Cell formatting with PHPExcel_Cell_DataType::TYPE_STRING does not work
Hello,
Formatting of cells with PHPExcel_Cell_DataType::TYPE_STRING does not work for me, I am trying to collect phone number from the excel generated but its always stripping the first 0 from the excel.
I am using PHPExcel version 1.8.0.
How are you setting the cell value? Simply setting formatting to a type of string won't automagically convert a numeric value to one with leading zeroes, you need to set the cell value explicitly as a string datatype to retain the existing leading zeroes
This is my code
$objPHPExcel->getActiveSheet()->setCellValueExplicit('E5', ' ', PHPExcel_Cell_DataType::TYPE_STRING);
So you're setting an empty string?
Alright, what format are you writing, and how are you checking how it's been written?
i also tried the same thing, but does not work either