Import big XLSX, CSV and ODS files with Laravel Fast Excel
Laravel Fast Excel is intended at being a simple wrapper around Spout for Laravel with the goal of simplifying imports and exports. It aims to be faster than existing Laravel Spreadsheet libraries and memory friendly, with only the most important features.
Laravel Fast Excel works with Collections. When you import a XLSX file, it converts the rows to a collection, using the first line as header:
$collection = (new FastExcel)->import('file.xlsx');
You can filter, map and transform the collection as usual:
$collection->filter()->each(function($item) {
User::create([
'name' => $item['name'],
'email => $item['email']
]);
});
More informations: https://github.com/rap2hpoutre/fast-excel
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5.5 Laravel 5.4 Laravel 5.3 Laravel 5.6 Intermediate