asafdav/ng-csv

Problem with BOM and Saving files in Excel

Opened this issue · 1 comments

I need to add the attribute add-bom="true" because I am localizing my CSV File. The problem comes when I open the file, and try to save. The format will change, and if you try it to open again the file you will see a complete disorder.

Steps to reproduce:

  1. Generate a CSV file with at least 2 columns and with special characters (With add-bom attribute).
    <button type="button" ng-csv="getArray" csv-header="getHeader()" filename="example.csv" field-separator="," decimal-separator="." add-bom="true">
  2. Open the file in Excel
  3. Save the file with the button at the top of Excel (image), and close the file. (Don't save it again when Excel asks you)
  4. Open the file with Excel.

Before you save the file:
image
image

After you save the file:
image
image

Any help will be appreciated it.

Thanks.

Same problem.
(Win 7, Office 2013)