Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

underscore is ignored and convert to "-" #41

Closed
monaye opened this issue Mar 13, 2014 · 2 comments
Closed

underscore is ignored and convert to "-" #41

monaye opened this issue Mar 13, 2014 · 2 comments

Comments

@monaye
Copy link

monaye commented Mar 13, 2014

After recent update following will replace the underscore "_" to dash "-" of header row.

Excel::load('file.csv', true)->toArray();

@MaatwebsiteSupport
Copy link
Contributor

Not really an issue, I guess?
This is caused by the Str::slug() function of Laravel.

MaatwebsiteSupport pushed a commit that referenced this issue Apr 4, 2014
@MaatwebsiteSupport
Copy link
Contributor

If you didn't publish the config yet do:

php artisan config:publish maatwebsite/excel

And change the seperator to _

Else add to the app/config/packages/maatwebsite/excel/config.php

/*
    |--------------------------------------------------------------------------
    | Slug seperator
    |--------------------------------------------------------------------------
    |
    | The default seperator for the Str::slug() method.
    | If you have problemen with _ being converted to -, you can
    | change the seperator to _ here.
    |
    */
    'seperator' => '_',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants