Whole column for validation

Aug 25, 2011 at 4:53 AM

$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation();
$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
$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('"Item A,Item B,Item C"');

This script can modify a validation for cell 'B5'

If I want to modify the whole column 'B'. How  can I edit the code?

On the other side,
We need to input all list menu item
$objValidation->setFormula1('"Item A,Item B,Item C"');

Can I use original excel validation setting?
Such as my original excel already setup

Can I use this original setting?

Aug 31, 2011 at 10:02 AM

Or can I change getCell("B5") to get whole column function?

Because each cell add once is so slow