Fast Excel Laravel -> Need to add style for some specific rows But not found any solution

79 Views Asked by At

Fast Excel Laravel -> Need to add style for some specific rows But not found any solution.

$fastExcel = (new FastExcel($export_object->collection($params)));

                $rows_style = (new Style())
                    ->setFontColor(Color::BLUE)
                    ->setBackgroundColor("EDEDED");

                $fastExcel
                    ->rowsStyle($rows_style) // Apply row style
                    ->export(storage_path('app/export/' . $file_name), function ($row) use ($params, $export_object) {
                        $params['row']  = $row;
                        return $export_object->columns($params);
                    });

                $filename = config('app.url') . '/storage/app/export/' . $file_name;

Using above code, Its apply to whole data. I want to add style to some specific cells only.

0

There are 0 best solutions below