Custom CSV Settings #71

Closed
opened 2023-04-18 21:48:12 +00:00 by mackhankins · 7 comments
mackhankins commented 2023-04-18 21:48:12 +00:00 (Migrated from github.com)

Would it be possible to support these in a future version?

https://docs.laravel-excel.com/3.1/exports/settings.html#custom-csv-settings

Would it be possible to support these in a future version? https://docs.laravel-excel.com/3.1/exports/settings.html#custom-csv-settings
pxlrbt commented 2023-04-20 05:14:03 +00:00 (Migrated from github.com)

I haven't used CSV export yet, but it should be easy to add.

I haven't used CSV export yet, but it should be easy to add.
SDJeff commented 2023-08-25 14:56:00 +00:00 (Migrated from github.com)

Would be great if that can implemented

Would be great if that can implemented
pxlrbt commented 2023-08-26 08:00:11 +00:00 (Migrated from github.com)

Curious on which settings you are interested in? All of them? Do you want to set these per Export? Or why don't you overwrite the config file?

Curious on which settings you are interested in? All of them? Do you want to set these per Export? Or why don't you overwrite the config file?
SDJeff commented 2023-08-27 05:44:17 +00:00 (Migrated from github.com)

Just need a simple TXT File Values TAB separated. For example:

->withCustomCsvSettings(
        [
            'delimiter' => '\t',
            'use_bom' => false,
            'output_encoding' => 'ISO-8859-1',
        ];
)
Just need a simple TXT File Values TAB separated. For example: ``` ->withCustomCsvSettings( [ 'delimiter' => '\t', 'use_bom' => false, 'output_encoding' => 'ISO-8859-1', ]; ) ```
ret-et commented 2023-09-04 08:27:55 +00:00 (Migrated from github.com)

@SDJeff I just ran into the same issue.

I'm using this quick and dirty trick to overwrite the config on the fly.

FilamentExcel\Actions\Tables\ExportBulkAction::make()
    ->before(function () {
        config(
            [
                'excel.exports.csv' => [
                    'delimiter' => '\t',
                    'enclosure' => '',
                ]
            ]
        );
    })

Update:
We have one download action that needs a different format than all other CSV downloads, which is why it would be nice to control it per export action.

@SDJeff I just ran into the same issue. I'm using this quick and dirty trick to overwrite the config on the fly. ```php FilamentExcel\Actions\Tables\ExportBulkAction::make() ->before(function () { config( [ 'excel.exports.csv' => [ 'delimiter' => '\t', 'enclosure' => '', ] ] ); }) ``` Update: We have one download action that needs a different format than all other CSV downloads, which is why it would be nice to control it per export action.
SDJeff commented 2023-09-12 06:28:52 +00:00 (Migrated from github.com)

Check! Works like mentioned! Could be a workaround! Thx

Check! Works like mentioned! Could be a workaround! Thx
pxlrbt commented 2026-02-17 18:13:04 +00:00 (Migrated from github.com)

This was added now

This was added now
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pxlrbt/filament-excel#71
No description provided.