php - Error unicode export csv file - Laravel/Excel -
i have problem, can guys me ?
i use maatwebsite/laravel-excel export japanese text database csv file.
when open export file using ms excel, got lot of symbols.
but when open using notepad++ or upload google drive, got want.
how can fix ?
this code :
public function export($type, $properties, $data) { if (in_array($type, self::export_type)) { try { $export = excel::create($properties['_title'], function ($excel) use ($data, $properties) { $excel->sheet('sheet', function ($sheet) use ($data) { foreach ($data $item) { $sheet->fromarray($item); } }); })->export('csv'); } catch (exception $error) { throw $error; } } }
i solved it. if 1 problem, try edit config/excel.php : change 'use_bom' => false
'use_bom' => true
.
hope helpful !
Comments
Post a Comment