in reply to Data_validation in Spreadsheet::WriteExcel


This isn't a Spreadsheet::WriteExcel problem as such. The data_validation() value parameter requires an array ref of values but you are passing an array ref with a single string value:

Something like the following should work:

my @columnEvidence; foreach my $e (@{$xmlData->{columnEvidence}}) { push @columnEvidence, $e; } ... $worksheet[$counterWorkSheet]->data_validation('E'.$counterRow, { validate => 'list', value => [ @columnEvidence ], }); # Or: value => \@columnEvidence,

Or skip the accumulation and just use the array ref directly:

value => $xmlData->{columnEvidence},

--
John.