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:
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.
A full export of the product database contains information about each product in the catalog, and the relationships between them. Each record has fixed selection of columns that corresponds to the attributes in the catalog, although the order of the attributes is ignored during the import process.
The first row of the table contains the names of each attributeA characteristic or property of a product; anything that describes a product. Examples of product attributes include color, size, weight, and price., which are used as column headers. The remaining rows describe the individual product records. Any row that begins with a value in the SKUStock Keeping Unit: A number or code assigned to a product to identify the product, options, price, and manufacturer. column is the beginning of a new product record. A single product might include several rows that contain information about multiple images or product options. The next row that has a value in the SKU column begins a new product.
The categoryA set of products that share particular characteristics or attributes. column contains a path for each category to which the product is assigned. The path includes the root category, followed by a forward slash (/) between each level. By default, the pipe “|” character is used to separate different category paths. For example:
Default Category/Gear|Default Category/Gear/Bags.
To import data, you need to include only the SKU and any columns with changes. Any blank columns are ignored during the import process. It is not possible to add attributes during the import process. You can include only existing attributes.
For a detailed description of each product attribute, see: Product Attribute Reference.
CSV Product Structure
Column headers that begin with an underscore contain service entity properties or complex data. Service columns are not product attributes.
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.
The first row of the table contains the names of the attribute columns (which are the same as attribute codes). There are two types of column names, as shown in the following table. Other rows contain attribute values, service data, and complex dataData that is associated with multiple product options.. Each row with non-empty values in the “email” and “_website” columns starts the description of the subsequent customer. Each row can represent customer data with or without address data, or the address data only. In case a row contains only the address data, values in the columns, related to the customer profile, will be ignored and may be empty.
To add or replace more than one address for a customer, in the import file add a row for each new address with empty customer data and the new or updated address data below the customer data row.
For a detailed description of each customer attribute, see: Customer Attribute Reference.
CSV Customer Structure
Column headers that begin with an underscore contain service entity properties or complex data. Service columns are not customer attributes.
The names of the columns with values of both system-created attributes, and attributes created by the store administrator.