Warning: This article was written in 2019, the content might be out of date.
Warning: This article was written in 2019, the content might be out of date.
Categories: Laravel, excel
This is how you freeze a column or a row when using Laravel Excel.
class User implements WithEvents
{
public function registerEvents(): array
{
return AfterSheet::class => function(AfterSheet $event) {
$event->sheet->freezePane('B1');
},
];
}
}
See how to freeze pane from PhpSpreadsheet/Worksheet.php on GitHub.