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

Using a callback in import #13

Closed
rap2hpoutre opened this issue Apr 9, 2018 · 0 comments
Closed

Using a callback in import #13

rap2hpoutre opened this issue Apr 9, 2018 · 0 comments

Comments

@rap2hpoutre
Copy link
Owner

rap2hpoutre commented Apr 9, 2018

Maybe we could use a callback in import:

$result = (new FastExcel)->import('test.xlsx', function($line) {
    return Thing::create([
        'id' => $line['id'],
        'name' => $line['lastname'] . ' ' . $line['firstname'],
    ]);
});

Maybe with this issue, we could avoid making these issues: #7, #2 (for chunk), #5 and even #6 or #4

Maybe after we should add a callback for export too (styling, etc.)

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

1 participant