Hey @emfpc
Use this package, it will save you lots of headaches: https://laravel-excel.com/
Hope it helps!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Greetings. Currently i'm working with a export plug in where i must export data to excel everything works on my end but were i need the field to display example Credit Card Number of 16 character it round it. i have tried to format the column but it won't work in some cases. Is there a way a can bypass the format?
The Export Code: ' public function columnFormats(): array { return [ 'X' => NumberFormat::FORMAT_NUMBER, 'P' => NumberFormat::FORMAT_CURRENCY_USD, ]; }
public function view(): View{
$guests=Guest::all();
return view('form.export',compact('guests'));
}
'
The P column works which add the $ sign
Hey @emfpc
Use this package, it will save you lots of headaches: https://laravel-excel.com/
Hope it helps!
Please or to participate in this conversation.