Table Export Action Format Columns
Hello - does anyone know if it is possible to configure the column format in
Filament\Tables\Actions\ExportAction
? I am trying to export a list of items (name and barocde). The barcodes contain enough digits that Excel will automatically convert some of them to something like 1.23456E11
. I have tried modifying the ->state()
and ->formatStateUsing()
to return strings but that has not worked. I have also tried using ->words()
in the hope it would convert the column to text, but that did not work either.
Is there a way to set the entire column to text to prevent this? Thank you!4 Replies
Hey, thats not a filament problem but an excel one. You need to change the column to Number or text
Zach Bobbitt
Statology
How to Stop Excel from Formatting Numbers with E+11
This tutorial explains how to stop Excel from formatting numbers with E+11, including an example.
Thank you for the reply. Yes, it is an Excel problem. But there is usually a way to set the formatting for an Excel export but I can't find it for this action. Ideally, I don't want the end user to have to make any changes to the document
I don't think the export action from filament does that, it just picks the data from the DB, you can costumize it and it just puts in the file.