phpexcel cell value not showing up in excel file

For a legacy application I have to use PHPExcel and populate an existing Excel file(Excel5 format). A particular cell value starts disappearing in final excel file randomly. File is generated successfully without any errors but employee name is not populated in random rows. I tried it on PHP7.3 and PHP8.2, but same errors persists.

Here is the code I use to populate excel file

require_once dirname(__FILE__). '/../../php/PHPExcel/PHPExcel.php';     
$inputFileName = 'Template.xls';

// Read the existing excel file
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);

// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);

$row=3;
for($i=0;$i<count($data);$i++){
            $row++;
            $objPHPExcel->getActiveSheet()
                        ->setCellValueExplicit('A'.$row, $data[$i]['code'],  PHPExcel_Cell_DataType::TYPE_STRING)
                        ->setCellValueExplicit('B'.$row, $data[$i]['employee_name'],  PHPExcel_Cell_DataType::TYPE_STRING)
                        ->setCellValueExplicit('C'.$row, $data[$i]['category_name'],  PHPExcel_Cell_DataType::TYPE_STRING);
}

If I insert following line in loop then employee name shows up properly in excel file

$data[$i]['employee_name']='123-'.$data[$i]['employee_name'];

If I use 12- then employee name disappears in some rows and if I use 1- then employee_name in some more rows go blank. I also tried with UTF encoding but the result was same. If I add * in place of *123- then also employee name goes away. It looks like if and only if I used some numeric prefix to the field only then it gets displayed.

What am I doing wrong, please help.