export format column

Hi everyone, Can anyone explain how to set up ExportColumn to use a numeric value? I tried using formatStateUsing, but it is still not working:
ExportColumn::make('balance')
->formatStateUsing(fn(int $state): int => $state);
ExportColumn::make('balance')
->formatStateUsing(fn(int $state): int => $state);
The result is still a TEXT value (as shown in the screenshot).
No description
4 Replies
Juan Duarte Molina
Did you find any solution? Thanks
Jr.Pikong
Jr.PikongOP4mo ago
No , I dont have a solution 🙏
Juan Duarte Molina
So, we can not work with the exported excel "out-of-the-box " ? Need convert the columns manually. Maybe we should use https://laravel-excel.com/ instead of the exporter option ...🥺
Laravel Excel
Supercharged Excel exports and imports in Laravel | Laravel Excel
Laravel Excel is intended at being Laravel-flavoured PhpSpreadsheet: a simple, but elegant wrapper with the goal of simplifying exports and imports.
Juan Duarte Molina
Any further help on this topic? will be appreciated
Want results from more Discord servers?
Add your server