Laravel Excel Freeze Pane

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.

Next | Previous

Other posts