Jump to content

Upload csv error "Invalid character"


natebc

Recommended Posts

Do the following

 

1 - when uploading, go to "Catalog > Products" then click on "Import, or go to "Advanced Parameters > CSV Import" and an import page will show up

   - make sure you have selected the type of import you want to carry out in the drop-down labelled "What kind of entity would you like to import?".  Ensure this is correctly selected each time even when an upload fails as then the page may refresh and it defaults to the first item "Categories", or the mouse may move and if you do not notice this, then you are trying to import a products file for a "Categories" or other format and the result is "Invalid Character"

 

2 - When creating the file before upload, ensure that the columns for prices are converted to have 2 decimal places (this may or may not impact on upload, but I have done this all the same).  Then make sure that for all columns with dates, the format is yyyy-mm-dd .  You can use any date format you are comfortable with when completing the spreadsheet e.g. dd/mm/yyyy, then when you are done and are ready to upload, convert the date columns so as not to get "invalid date format" message.  To do this in the spreadsheet, highlight a date column, right-click and select "format cells".  On the "Number tab" under the "Category" list, select "Custom".  Then in the field labelled "Type:", enter "yyyy-mm-dd" (without the quotes)  and click  "OK".  The date will automatically turn to that format.  Do this for any other columns with date (you can ignore this for those date columns where a date column is entirely blank)

 

 

3 - Finally, convert the file to CSV format.  Latest version of Prestashop allows you to specify the delimiter you have used, e.g comma "," or semicolon ";"

     If you want to use semi-colon because some field e.g. category or features might have commas, then in your operating system, specify the delimiter. 

 

For windows operating systems, look at these instructions: 

- Click on Start button and click on control panel

- Open the Regional and Language Options Dialog box

- Depending on operating system version (XP, Vista, 7, 8, 10), locate the Formats tab and then click "Customise this format" or click on Regions tab and then click "Customize"

- Type a new separator in the List separator box  (semicolon " ; ")

- Click "OK" twice

Note: remember to switch it back e.g. to comma - if that was the default -when done, so that it doesn't cause confusion if someone else uses the system and tries to create csv files

 

Now, Go to Excel, click on "File > Save As" and under "Save As type:" field, search for and select "CSV (Comma delimited)"

 

You will be prompted about losing formatting, click "Yes" to all prompts.

 

You will then have your CSV file which you can happily upload into your prestashop site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...