PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

Using an array in Data Validation list

Open MarkBaker opened this issue 2 years ago • 0 comments

          $sheet->setDataValidation($r_cell_address, (new

\PhpOffice\PhpSpreadsheet\Cell\DataValidation()) ->setType(\PhpOffice\PhpSpreadsheet\Cell
DataValidation::TYPE_LIST) ->setErrorStyle(\PhpOffice\PhpSpreadsheet\Cell
DataValidation::STYLE_INFORMATION) ->setAllowBlank(false)->setShowInputMessage(true)-> setShowErrorMessage(true)->setShowDropDown(true) ->setErrorTitle('Input error')->setError('Value is not in list.') ->setPromptTitle('Pick from list')->setPrompt('Please pick a value from the drop-down list.') ->setFormula1('"Entry Level,Leadership"') );

i can't use array in setFormula1. How to use array in setFormula1 can you guide me in php?

On Sat, May 20, 2023 at 9:32 AM Henis Chodvadiya @.***> wrote:

Thank you

On Sat, May 20, 2023 at 9:31 AM Henis Chodvadiya < @.***> wrote:

Got it.

On Fri, May 5, 2023 at 9:20 PM oleibman @.***> wrote:

The Python code at https://gist.github.com/Mike-Honey/b36e651e9a7f1d2e1d60ce1c63b9b633 for converting theme/tint to rgb gets us quite close to our target (final value is 558ed5 rather than 538dd5). It can probably be adapted to Php; I'm not sure that the effort is worthwhile.

— Reply to this email directly, view it on GitHub https://github.com/PHPOffice/PhpSpreadsheet/issues/3550#issuecomment-1536451647, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4KWRH3B27RBX62X6B7IKTDXEUOTPANCNFSM6AAAAAAXVHMAAI . You are receiving this because you commented.Message ID: @.***>

Originally posted by @HenisPatel in https://github.com/PHPOffice/PhpSpreadsheet/issues/3550#issuecomment-1555462710

MarkBaker avatar May 20 '23 10:05 MarkBaker