ng-table-export icon indicating copy to clipboard operation
ng-table-export copied to clipboard

Improvement suggestion: prepend BOM to CSV

Open Myrmex opened this issue 11 years ago • 1 comments

Hi, I'm using this code and when I open the file with the default CSV handler, which like in several other machines happens to be Excel, I get garbage characters instead of my Unicode characters. Yet, the CSV is built correctly and I can see it if I save it before opening. This is a known issue for Excel, and the workaround is prepending the CSV with the BOM code, by changing your code at line #20 to data = '\uFEFF'; instead of just data='';. This way, any modern version of Excel (probably above 2003) opens the file correctly. Maybe you could consider integrating this change into your code. Thank you!

Myrmex avatar Mar 10 '14 14:03 Myrmex

Since this repo was not being updated, we forked it and would welcome suggestions like these that could improve the library.

Check out https://github.com/kollavarsham/ng-table-to-csv

floydpink avatar May 18 '15 05:05 floydpink