File Editing with Excel

I am not sure why but I seem to be having trouble importing files that I have edited in Excel. I did not have any problems with 1.x version but seem to in 2.x. Is anyone else editing in Excel and importing the file fine? If so, what are your settings?

I do know that Excel changes the original as you can see below in the comparison but this is beginning to drive me crazy. The difference is the quotes.

Original export opened in notepad:

Product code,Supplier<br />
"WATTRX5210","WTD"<br />
"WATTRX5213","WTD"<br />
"WATTRX6013R","WTD"<br />
"WATTRX6013RBK","WTD"<br />
"WATTRX6013RBU","WTD"<br />
"WATWB4202","WTD"<br />
"WATWI1210","WTD"<br />
"WATWI1511","WTD"<br />
"WATWI1511BK","WTD"<br />
"WATWI1511BU","WTD"<br />
```<br />
<br />
Excel edited file opened in notepad:<br />
Product code,Supplier<br />
WATTRX5210,WTD<br />
WATTRX5213,WTD<br />
WATTRX6013R,WTD<br />
WATWB4202,WTD<br />
WATWI1210,WTD<br />
WATWI1511,WTD<br />
WATWI1511BK,WTD<br />
WATWI1511BU,WTD<br />

I have done massive amounts of imports and exports using CSV. I have never had this problem.

When are the quotes appearing?

The quotes are in the original export.

Are you editing with Excel and then importing with no problems?

Well it’s not the quotes that is causing the problem because that is how it is exporting in 1.3.5. I don’t know what the hell is going on.

This is actually a bug. I installed a fresh copy of 2.0.5 and had no problems importing an Excel edited file. As soon as I updated from 2.0.5 to 2.0.6 then I could no longer import without errors.

I find it much easier to import the products using the Import tab in the PHPMyAdmin tool that most servers have installed. I export from excel into csv format and import directly in the database through PHPMyAdmin. The trick is to create the columns in Excel that match the order of the columns in the database. Of course multiple tables will need to be imported (i.e. options, price, description, etc), but I have an Excel file that matches each cs-cart product table.

Much easier than using the Cs-Cart import.

Confirmed in red

This problem is a result of the changes made to /core/fn_fs.php. I could see some of the changes but was not about to analyze all of the changes so I just uploaded the file from 2.0.5.

Edit “core/fn.fs.php” and replace

list ($field) = explode($d, trim($st, "\r\n"), 2);


list ($field) = explode($d, $st, 2);

Official fix.

[QUOTE]The official solution (core/fn.fs.php)


list ($field) = explode($d, trim($st, "\r\n"), 2);
$st = substr($st, strlen($field) + strlen($d));


list ($field) = explode($d, $st, 2);
$st = substr($st, strlen($field) + strlen($d));
$field = trim($field);
if (empty($field)) {

Tool Outfitters,

Hi, I tried applying the code you supplied because I’m having errors uploading on v2.0.6. The new code fixes my upload issue for products but it’s causing my other upload menus for Goggle Base, Images and Qty Discounts to disappear? With this code fix are you seeing the same thing happen?



No problems here. Try clearing your cache.

Working now. Thanks!

[quote name=‘Tool Outfitters’]Edit “core/fn.fs.php” and replace

list ($field) = explode($d, trim($st, "\r\n"), 2);


list ($field) = explode($d, $st, 2);[/QUOTE]

THanks so many