PHPExcel removes Data Validation Option of Excel sheet after editing existing Excel Sheet #330
Description
I am using PHPExcel for editing existing excel sheets.
I had already set up a Data Validation method in my excel sheet
When i edit this excel using PHPExcel, this Excel Specific Data Validation vanishes.
I am using MSoffice 2007;
For snapshots: please refer to this question : http://stackoverflow.com/questions/22119876/phpexcel-removes-data-validation-option-of-excel-sheet-after-editing-existing-ex
My PHP code:
//load existing template..
$objPHPExcel = PHPExcel_IOFactory::load('www/PHPExcelReader/Excel_Uploads/sample.xls');
// Set document properties
$objPHPExcel->getProperties()->setCreator("Logic Item")
->setLastModifiedBy("Logic")
->setTitle("List");
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('AZ1', $combination);
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$file_name='sample.xls';
$objWriter->save($file_name);
echo "Excel is ready to download now...";