I want export an excel file using Laravel-Excel package and want excel cell have drop down menu . now i do this for one cell of column but i want do this for all cell of column except column title.
AfterSheet::class => function (AfterSheet $event) {
/** @var Sheet $sheet */
$sheet = $event->sheet;
/**
* validation for bulkuploadsheet
*/
$configs ="DUS800, DUG900+3xRRUS, DUW2100, 2xMU, SIU, DUS800+3xRRUS,
// DUG900+3xRRUS, DUW2100";
$objValidation = $sheet->getCell('A2')->getDataValidation();
$objValidation->setType(DataValidation::TYPE_LIST);
$objValidation->setErrorStyle(DataValidation::STYLE_INFORMATION);
$objValidation->setAllowBlank(false);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
$objValidation->setShowDropDown(true);
$objValidation->setFormula1('"' . $configs . '"');
}
using this part of code $objValidation = $sheet->getCell('A2')->getDataValidation();
i can create drop down only for one cell of A column but i want do this for all cell of column A except column title. Thanks