Closed boonstoppel closed 6 years ago
I don't think it's possible in Excel. It's Google Docs feature.
Found a solution.
$list = trim(implode(',', [ 'foo', 'bar, 'baz' ]));
$cell ->getDataValidation() ->setType(PHPExcel_Cell_DataValidation::TYPE_LIST) ->setErrorStyle(PHPExcel_Cell_DataValidation::STYLE_INFORMATION) ->setAllowBlank(true) ->setShowDropDown(true) ->setErrorTitle('Input error') ->setError('Value is not in list') ->setFormula1(sprintf('"%s"', $list));
Hi,
is it possible to create an in-cell dropdown list via the PHPExcel library?
For example: http://d.pr/i/b49Juk/3VMAJy6o
Here an explanation how to do this in spreadsheets: https://support.google.com/docs/answer/186103