Keep Leading 0 of Numbers in Excel

By default, the leading 0 will be removed if the value is a number:

$worksheet->setCellValueByColumnAndRow($columnIndex, $rowN, $cell_value);

Solution:

$cell = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($columnIndex, $rowN);
$cell->setValueExplicit($cell_value, PHPExcel_Cell_DataType::TYPE_STRING);

Reference: