Magento Open Source 2.2.x

Working with CSV Files

The comma-separated-value (CSVComma Separated Values: A type of file used to store data values which are separated from each other by commas.) file format is used as the basis of data transfer operations, and is supported by all spreadsheet and database applications. The following file types are supported for import and export:

  • Import

    CSV and ZIP (a compressed CSV file.)



Important! We recommend that you use a program that supports UTF-8 encoding, such as Notepad++ or OpenOffice Calc, to edit CSV files. Microsoft Excel inserts additional characters into the column header of the CSV file, which can prevent the data from being imported back into Magento. If you work on the Mac, you can save your data in the CSV (Windows) format.

CSV files have a specific structure that must match the database. Each column heading corresponds to the Attribute Code of the field that is represented by the column. To ensure that the column headings can be read by Magento, first export the data from your store as a CSV file. You can then edit the data and re-import it into Magento.

If you open an exported CSV file in a text editor, you will see that values are separated by commas, and multiple values are enclosed in double-quotes. During import, you can specify a custom separator character, although a comma is the default.