mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-25 23:06:03 +03:00
Documentation updates
This commit is contained in:
parent
9d66087272
commit
518f06ee20
Binary file not shown.
@ -62,7 +62,15 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data
|
||||
->setCellValue('A3', "Number:")
|
||||
->setCellValue('B3', "10")
|
||||
->setCellValue('A5', "List:")
|
||||
->setCellValue('B5', "Item A");
|
||||
->setCellValue('B5', "Item A")
|
||||
->setCellValue('A7', "List #2:")
|
||||
->setCellValue('B7', "Item #2")
|
||||
->setCellValue('D2', "Item #1")
|
||||
->setCellValue('D3', "Item #2")
|
||||
->setCellValue('D4', "Item #3")
|
||||
->setCellValue('D5', "Item #4")
|
||||
->setCellValue('D6', "Item #5")
|
||||
;
|
||||
|
||||
|
||||
// Set data validation
|
||||
@ -93,6 +101,19 @@ $objValidation->setPromptTitle('Pick from list');
|
||||
$objValidation->setPrompt('Please pick a value from the drop-down list.');
|
||||
$objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the list items between " and " !!!
|
||||
|
||||
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation();
|
||||
$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
|
||||
$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
|
||||
$objValidation->setAllowBlank(false);
|
||||
$objValidation->setShowInputMessage(true);
|
||||
$objValidation->setShowErrorMessage(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('$D$2:$D$6'); // Make sure NOT to put a range of cells or a formula between " and " !!!
|
||||
|
||||
|
||||
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
|
||||
$objPHPExcel->setActiveSheetIndex(0);
|
||||
|
Loading…
Reference in New Issue
Block a user