rap2hpoutre / fast-excel

🦉 Fast Excel import/export for Laravel
MIT License
2.1k stars 246 forks source link

CSV configuration Econding #214

Open gabrielchiron opened 3 years ago

gabrielchiron commented 3 years ago

Hi al!!

The Excel format it working fine. The CSV format in UTF-8 is working fine,

But im try to download the csv in other cofication, Windows-1252. But all time the .csv is in UTF-8

This is my code:

return (new FastExcel($rows))->configureCsv('|', '"', '\n', 'Windows-1252')->download('file.csv');

Im try to use 'gmk' like the example in this repo but the file all time download in UTF-8

Any solution??

rap2hpoutre commented 3 years ago

I just updated dependencies (including Spout). Could you try to install the v3.0.0: composer require rap2hpoutre/fast-excel:^3? Let me know if it fixes your issue.

gabrielchiron commented 3 years ago

Hi @rap2hpoutre sorry for answering so late. When i use this command in terminal: file -I terminal prompt this: text/plain; charset=utf-8

the code is this:

return (new FastExcel($rows))->configureCsv('|', '"', 'Windows-1252')->download('file.csv');