I dont know what im doing wrong, or maybe its something normal. I have to load and "read" a excell with about 12000 rows. I use this code for that.
Excel::selectSheetsByIndex(0)->load($path.$fileName, function ($reader) {
$reader->each(function($row){
Log::info('$row');
});
});
As you can see, there is nothing heavy wich could make the read so slow. I need to process hte data after the reading, so is a problem if only reading takes more than 5-10 minutes.
I tried also with the chunk filter, but nothing went better.
Is this normal?
I know excel reading is slow, as i read in other questions, but "this" slow? Thank you.
You could use Laravel Fast Excel which aims to be faster. It has less feature, but it's OK for a simple XLSX import.
(new FastExcel)->import('your-file.xlsx', function ($row) {
// Do what you want with this line, you can use it as an array.
dump($row);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With