phpexcel validation issue for invalid values

Topics: Developer Forum, Project Management Forum, User Forum
Jan 29, 2014 at 1:35 AM
Edited Jan 29, 2014 at 1:36 AM
Here's my problem, I have a validation in one of my excel.
$objValidation = $sheet->getCell('G17' )->getDataValidation();
$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_DECIMAL );
$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP );
$objValidation->setOperator( PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL);
$objValidation->setErrorTitle('Input error');
$objValidation->setError('Only numeric entries are allowed.');
$objValidation->setPromptTitle('Allowed input');
$objValidation->setPrompt('Only numeric entries are allowed.');
When the user try to enter alphabet characters on 'G17' cell, user was prompted by the error message with the following buttons : "OK", "Cancel" , "Help" .

But when the user try to enter NUMERIC characters, the validation message appear again. Is there a way to validate alphabet characters ONLY..
Jan 29, 2014 at 11:42 AM
You must define a minimum value (Formula1) and a maximum value (Formula2)