# Settings

# Properties

By default the Worksheet properties get configured in config/excel.php. You can configure a default title, description, creator, etc.

If you want to overrule on a per export basis, you can use the WithProperties concern.

namespace App\Exports;

use Maatwebsite\Excel\Concerns\WithProperties;

class UsersExport implements WithProperties
{    
    public function properties(): array
    {
        return [
            'creator'        => 'Patrick Brouwers',
            'lastModifiedBy' => 'Patrick Brouwers',
            'title'          => 'Users Export',
            'description'    => 'Latest Users',
            'subject'        => 'Users',
            'keywords'       => 'users,export,spreadsheet',
            'category'       => 'Users',
            'manager'        => 'Patrick Brouwers',
            'company'        => 'Maatwebsite',
        ];
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

It's not required to return all properties, you can ommit the keys you don't want to overrule.

public function properties(): array
{
    return [
        'creator' => 'Patrick Brouwers',
    ];
}
1
2
3
4
5
6

# Custom CSV Settings

By default Laravel Excel uses the defaults from the config (config/excel.php). You can change this by adding the WithCustomCsvSettings interface.

namespace App\Exports;

use Maatwebsite\Excel\Concerns\WithCustomCsvSettings;

class UsersExport implements WithCustomCsvSettings
{    
    public function getCsvSettings(): array
    {
        return [
            'delimiter' => ';'
        ];
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13

# Available csv settings settings

  • delimiter
  • enclosure
  • line_ending
  • use_bom
  • include_separator_line
  • excel_compatibility