Here’s the code i’m using right now to set the cell values. It works alright if the number has separators like . or / but when there’s no separator it gets saved as int and the leading 0 is stripped
$sheet->setCellValue($letter[$j].$row_nr,$entity['Phone'], PHPExcel_Cell_DataType::TYPE_STRING);
Either:
or
Note that in the first case I’m calling the setCellValueExplicit() method, not the setCellValue() method. In your code, passing PHPExcel_Cell_DataType::TYPE_STRING to setCellValue() has no meaning, and the argument is simply ignored.