Good morning, I have some data in MySql which I export to Excel using the PHPExcel library, but some of the codes contain "zero" on the left, example: 010, but at the time of generating the Excel the data remains as "10" and I need it to be as it originally is, that is "010" I have already formatted the cells using this sentence:
$objPHPExcel = new PHPExcel();
$objPHPExcel->getDefaultStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_TEXT);
Although it actually leaves me the file with all the cells in text format, it continues to remove the zero on the left, I have already tried some codes found in some forums without getting the result I need, I appreciate any help. I've also tried this:
$objPHPExcel->getActiveSheet()->setSharedStyle($estiloInformacion, "A4:J".($i-1),PHPExcel_Cell_DataType::TYPE_STRING);