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

Add support to cast values #4

Open
mahmudkuet11 opened this issue Mar 25, 2020 · 0 comments
Open

Add support to cast values #4

mahmudkuet11 opened this issue Mar 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mahmudkuet11
Copy link
Owner

Something like this

SheetReader::makeFromCsv('/path-to-csv-file/example-file.csv')
            ->delimiter(",")
            ->columns(['id', 'name', 'age'])
            ->casts([
                 'age' => 'integer'
            ])
            ->onEachRow(function($row, $index){
                var_dump($row);
            })->read();
@mahmudkuet11 mahmudkuet11 added the enhancement New feature or request label Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant