I'm trying to import a csv file with Laravel-Excel. The data has some fields that are enclosed by double quotes (") and have multiple lines. But Laravel-Excel is not reading these fields.
This is the a single line of data I'm trying to import (the problem is with the second column):
0,"Sunga Mini Boxer Oceania GRIGO COLLECTION
Modelo Mini Boxer, confeccionada com tecido Lycra Rosset de alta qualidade e durabilidade.
A parte branca contem forraao dupla em poliamida, evitando que fique transparente ao molhar.",5,20,20,5,normal,normal,normal
And this is my code:
$path = $request->file('products_file')->getRealPath();
\Config::set('excel.csv.enclosure', '"');
$data = Excel::load($path, function($reader) {
})->get();
foreach ($data as $key => $value) {
...
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire