Magento for B2B Commerce

Working with CSV Files

The comma-separated-value (CSV) 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.)

    Export

    CSV

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.

Product CSV Structure

Exported Product CSV in OpenOffice Calc

Exported Product CSV in Notepad++
  • CSV Product Structure

    Column Name

    Description

    _<name>

    Column headers that begin with an underscore contain service entity properties or complex data. Service columns are not product attributes.

    <attribute name>

    Column headers with an attribute code or field name identify the column of data. A column might represent a system attribute, or one that was created by the store administrator.

Customer CSV Structure

Exported Customer CSV in OpenOffice Calc

Exported Customer CSV in Notepad++
  • CSV Customer Structure

    Column Name

    Description

    _<name>

    Column headers that begin with an underscore contain service entity properties or complex data. Service columns are not customer attributes.

    <attribute name>

    The names of the columns with values of both system-created attributes, and attributes created by the store administrator.