Open logindian opened 10 years ago
Unable to replicate this problem, can you please provide a spreadsheet file that demonstrates the issue
I am unable to attach the xls file here. Please provide email id. How did i create the issue is, I had set up an validation on A1 cell from G1:G4 cells. Intially G1:G4 is empty so A1 will show one blank dropdown list. Then i am writing G1:G4 using PHPExcel , values are written but A1 cell does not have the validation.
Hi,
I ran into this problem.
To reproduce:
Now open the new workbook with Excel: the cells that were list-validated are now just plain cells. All data validation parameters seem to be gone: title, error message, datasource.
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...";