How to import an Excel-edited CSV?

Okay so I’ve downloaded the test.csv on the CS-Cart website. I import it to my CS-Cart, works fine. I decide to open it in Excel, don’t make any changes, but just re-save it. I get this message…



This csv may contain features that are not compatible with CSV (Comma delimited). Do you want to keep the workbook in this format?



If I click YES, and import the CSV to CS Cart I get the error:

Warning: Your CSV file has incorrect data formatting (incorrect delimiter, missed fields, etc.) on the following lines: 2



If I click NO, I get the error:

Error: The delimiter in CSV file differs from one you selected

Error: Your import file MUST have the following fields: Product code



It seems either way I cannot open a CSV in Excel, save it, and import it.



What do I need to do to get this CSV file to import? I’m running Office Excel 2003.

It sounds as though you don’t have headings on your columns. Create one product in CS-Cart that has all the options you will need with your products. Export that product to a .csv file. Open the file, and you will see all the headings you need in your list. You can then add all your product variables in the correct columns (i.e. product code, description, price, etc.), save the file as a .csv file and import it.



You don’t necessarily have to keep all the columns that are there but you do need to have headings on all the columns you have in your list.



And just a tip - make sure your final column has data in it and is not just a heading with no information.



Hope this helps.

Thanks but CS-Cart’s test csv definitely had headers in it. All I did was open it and resave it, I didn’t remove the headers.



I hoping someone is going to come along and say ‘no you can’t use Excel for the csvs, it breaks them… use such-and-such program’?

Sorry, but Excel is the best thing that I know of to use for editting your csv files.

There are a few basics to get out of the way. I know, because I’ve run into all of them before.



1] If your version of Excel is old, it will not parse the CSV correctly. Not sure, but I think it has to be 2003 or newer.



2] Open Office has all the MS Office tools, plus one that is like Excel. It does some things much better than Excel, like open and close CSV files. Plus, it’s free. I switch to it sometimes when I’m having Excel issues.



3] My products have long descriptions. This sometimes really messes with the CSV files. I don’t know when or why, it just does. For that reason, I export and import in Tab Deliminated file type. It solves all my issues and works better within Excel. I never use the Comma Separated format.

I have been using Excel 2003 with the comma separated format for importing all my products from a different cart and it has worked a treat. Some of my long descriptions are extremely long, including formatted tables, etc., and (so far) everything has imported beautifully. What version of Excel are you using? Are you changing the CSV Delimiter to comma when exporting and importing the file?

Hi Lyn,



I’m using Excel 2003 and it gives me problems when I use CSV. Exporting seems to be the biggest problem when using the comma file type. Here’s what happens . . .



1] Open an new workbook in Excel



2] Go to Data -->Import External Data → Import Data



3] When the selected file first comes into Excel, it automatically tries to determine the file type. But it also asks if the file is “deliminated” and if so, why type of delimination. For me, it always seems to have “Tab” checked by default.



4] Before I make any selections, I preview the file in the window at the bottom of the screen. It will break out the headers just fine, but starts to go haywire when it first hits one of my long descriptions. This causes goofy things to happen in the rows that follow.



5] Then I start to make selections within that first screen. I’ll check the “Comma” type for delimination and it helps some. Still, some of the description information runs over into pricing and other places it does not belong.



6] In fact, no matter what combination of file types I check there are always problems in the preview screen.



For me, the only solution is to start the process over. I go back into CS Cart and do another export, but this time with the “TAB” file type used. Then everything imports just fine.



When I save the file within Excel, I save it as “TAB” file type. After that, the only trick is to import into CS Cart and make sure you select “TAB” as the type being imported. Works like a million bucks for me.

[quote name=‘hondo69’]Hi Lyn,



I’m using Excel 2003 and it gives me problems when I use CSV. Exporting seems to be the biggest problem when using the comma file type. Here’s what happens . . .



1] Open an new workbook in Excel



2] Go to Data -->Import External Data → Import Data



[/QUOTE]



I am curious to know why you do steps 1 and 2. I just export from CS-Cart using the comma separated format and then open the resulting .csv file in Excel - no importing data or anything. Just out of curiousity, why are you using the import external data feature?

I’ve tried opening CSV files in Excel and end up with a gawdawful mess.



At least when I use the Import Data feature I stand a fighting chance with my text files. But like I said, if I’m using the TAB files all my problems disappear.

What kind of mess?



If you export/import a comma delimited file via the cart software, there should not be any problems viewing/editing the file. I am using Excel 2003 as well.

Wow, I just tried it and everything worked fine. I remember trying it early on and had problems and therefore never tried it again.



Here’s what I did:

1] Export products file as CSV

2] Simply performed an open file command within Excel

3] Deleted all but 1 product

4] Saved file

5] Imported the 1 product back into CS Cart



Everything imported just fine. I was worried because the last column is titled “Supplier”, and I don’t use this field. So the last cell was empty, which I’ve heard can cause import problems.



I’m really glad you prompted me to try this again. Makes my life easier, though I don’t know if Lyn’s problem has been resolved as yet.

Now, here’s a test for you. Go to export, but this time export the Google products. It will create a link on your page that when clicked, will allow you to download the file. Then, try to open that CSV file in Excel and tell me what you get.

The Google base file is a text delimited file. When creating/sending the file, save the file without the .csv extension and then open it with Excel.

Yep, works like a champ. Now I’m wondering if I’m the only one in the universe that didn’t know that little trick.



As long as we’re sharing tricks, before I upload my products to Google Base I combine two files exported from CS Cart. I export both the Google file and the Product file and bring them into Excel. I put one on the first worksheet and the other on the second.



Then I use a handy piece of software to get the best of both files. Then it’s just a matter of deleting the columns I don’t want. Of course, you have to rename the headers but it’s all pretty easy once you combine the files.

Why would you combine the 2 files? If there is more info that you want added to the Google Base file, then it can probably be easily added to the cart software. I have made some changes myself. I posted them in the Hints and Solutions section.

Very nice. I just might give it a try this weekend. All I have to do is backup the original file, then play with the revisions as I need. Low risk.

[quote name=‘hondo69’]Everything imported just fine. I was worried because the last column is titled “Supplier”, and I don’t use this field. So the last cell was empty, which I’ve heard can cause import problems.[/QUOTE]



The only trouble you will have if you don’t have any data in the last cell is that you will only be able to import 15 products at a time. As you only tried it on one product, it worked OK for you. If you try it on more than 15 products, you will only successfully import 15 of them.


[QUOTE]I’m really glad you prompted me to try this again. Makes my life easier, though I don’t know if Lyn’s problem has been resolved as yet.[/QUOTE]



I didn’t know I had a problem?? So far everything has been working perfectly with importing and exporting, including getting all my images in.

Oh, Lyn. You definitely have problems. It may not be this particular problem, but any website manager is sure to have something that doesn’t work correctly.

[quote name=‘hondo69’]Oh, Lyn. You definitely have problems. It may not be this particular problem, but any website manager is sure to have something that doesn’t work correctly.[/QUOTE]



Oh, I definitely agree! I just thought you were referring to Excel problems. And I certainly didn’t mean the post to sound like it did. I am very much a newbie with CS-Cart and it’s just that I had heaps of experience with importing and exporting using my old cart.



So sorry - I didn’t mean to sound like a know-it-all.

Oh I didn’t realise this thread was still alive and kicking, haha.



Anyway I solved my own CSV problems… installed Open Office and that worked fine :slight_smile: