Incorrectly Formatted CSV File

An error like this when you upload a CSV file means you do not have the correct amount of columns:

Notice: Undefined offset: 16 in /app/code/community/Webshopapps/Productmatrix/Model/Mysql4/Carrier/Productmatrix.php on line 891

Please read documentation specific to your extension and see extension specific examples to see the amount of columns.

A common cause for an incorrect CSV file is when there is a carriage return (line break) in one or more of the cells. Opening the file in a plain text editor such as Notepad or TextEdit will show carriage returns.

If there is a comma at the end of a CSV file, a spreasheet editor will not illustrate an empty column, whereas a plain text editor will show all of the commas.
For example, this line from a Product Matrix CSV has one too many columns:

*,*,*,*,*,*,*,*,*,*,*,*,*,900,*,Next Day,,
If you are receiving other SQL errors or seeing $0 rates on frontend then please look at you csv configuration for extension closely. We strongly recommend if you see issues you follow these steps to resolve:
  1. If just starting with the extension first use an example csv so you can get a feel of how it works
  2. Reduce down the csv to the actual issue seen, so that you are just focused on that
  3. Reduce any price, weight, country filters on the problem row so that the shipping is easier to achieve
  4. Add back in complexity a bit at a time, testing on each until you are comfortable with how it is working

The file format itself will need to be saved as a Windows file if saving on a Mac, saved as a comma-separated CSV file.

We recommend using either Libre Office or Open Office when working with CSV files. The CSV settings should match the following (note that for special characters, such as Chinese, the character set should be adjusted accordingly).

CSV file format

0 votes

Leave a Reply

Featuring WPMU Bloglist Widget by YD WordPress Developer