Problem generating a drop down with PHPExcell

0

Hello good afternoon, I'm having an identical problem when I assign to the cell the formula when generating the report, it does not take the form of drop down, it leaves the same but I am generating it with a range of cells.

$objPHPExcel->addNamedRange( new \PHPExcel_NamedRange( 'hiden_'.$cont_cat2, $objPHPExcel->getSheetByName(key($info)), 'A1:A'.count($hoja) ) );

$objValidation = $objPHPExcel->getActiveSheet()->getCell($abc[$col].'2')
                            ->getDataValidation();
                        $objValidation->setType( \PHPExcel_Cell_DataValidation::TYPE_LIST );
                        $objValidation->setAllowBlank(false);
                        $objValidation->setShowInputMessage(true);
                        $objValidation->setShowDropDown(true);
                        $objValidation->setErrorTitle('Input error');
                        $objValidation->setError('Value is not in list.');
                        $objValidation->setPromptTitle('Pick from list');
                        $objValidation->setPrompt('Please pick a value from the drop-down list.');
                        $objValidation->setFormula1('=hiden_1');
    
asked by Efrain Robles 24.05.2018 в 00:12
source

0 answers