Laravel-excel: Chunk Imported not work

Created on 15 Sep 2017  路  12Comments  路  Source: Maatwebsite/Laravel-Excel

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].

Package version, Laravel version

Laravel 5.4
maatwebsite/excel 2.1

Expected behaviour

Load data from csv file

Actual behaviour

Can't load data from csv file

Steps to reproduce the behaviour

I tried to load data from csv file by use the chunk imported, but there is no data , I don't know why.
My csv file

https://drive.google.com/file/d/0Bz-YEwnA8p4RaXJIeVVJZUtVTDg/view?usp=sharing

Most helpful comment

chunk() is being queued. See #1209
Read the docs.
Run queue worker or pass to chunk() 3rd parameter false or callback.

All 12 comments

Please include your CSV import code and update Laravel to 5.5.4, Laravel-Excel to 2.1.12 and then check if you still have problems.

@aliusa
I can't upload into git , don't know why so I uploaded it on google drive.

Please include sample code and update Laravel, Laravel-Excel.

image

@aliusa
Yes I tried by it seem that github doesn't accept csv file therefore I can't do it

image

Did you update said dependencies and still experiencing error? Please include sample code.

@aliusa
Yes I updated all dependencies package.
There is my composer.json and composer.lock files

I'm not sure it is bug or not.
If I load my file like this I can read data

Excel::load($filePath, function($reader) {
    $results = $reader->get();
    dd($results);                    
});

but if I do like that , I can't read the data

Excel::filter('chunk')->load($filePath)->chunk(250, function($results)
{
    dd($results);
});

chunk() is being queued. See #1209
Read the docs.
Run queue worker or pass to chunk() 3rd parameter false or callback.

@aliusa
Ah I got it, thank you, and one more question what driver prerequisites is use in this package ?

@gamevnlc
I don't know what you mean.

@gamevnlc which driver did you use for the Queue Driver in .env? i experiencing the same problem. when i use "sync" for QUEUE_DRIVER, the impor works but only import 20 data. when i changed it into "database", the import seems like being skipped

and how to run the queue worker in production server?

@aliusa
chunk() is being queued. Therefore I want to know which kind of queue driver is use in this package

@fadynoor
You must run the queue worker to process new jobs when they are pushed onto the queue
https://laravel.com/docs/5.4/queues#running-the-queue-worker

@gamevnlc
I don't know which one, but I use _database_.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

contifico picture contifico  路  3Comments

daraghoshea picture daraghoshea  路  3Comments

ellej16 picture ellej16  路  3Comments

bahmanyaghoobi picture bahmanyaghoobi  路  3Comments

alejandri picture alejandri  路  3Comments