Import/export File Formats: Delimiters And Headers

Regarding delimiters: The CS-Cart import tabs have the following instruction: [size=4]“[color=#333333]If you are importing data with special symbols (commas, semicolons, etc.), please make sure you have these fields quoted.”[/color][/size]



I am using Filemaker Pro, which supports tab-delimited CSV import/export, to pre-process my product data. Choosing tab as delimiter in Cs-Cart results in an export which imports perfectly into Filemaker Pro, including the JSON notation CS-Cart uses. E.g. the image CSV (ALT tag JSON at end is bolded in blue):



/home/dldollt/public_html/var/exim/backup/images/MAIN_7753_1-Alexander-vinyl-doll-Peekaboos-Classic-Piglet.jpg[color=#0000ff]#{[en]:Classic Piglet Winnie the Pooh character;}[/color]



A similar thing occurs in the products export CSV with features, for example:



[color=#0000ff]Artist: T[Julie Good Kruger]; Brand: T[Good Kruger Inc.]; Medium: T[Porcelain]; Inches Tall: O[16]; Edition Type: T[Limited Edition]; Edition Size: O[100]; Theme Words: T[childhood][/color]



Note that both examples have colons, semicolons, brackets and the first has #as well. Using tab as the CS-Cart delimiter imports into Filemaker exactly as shown in above examples from products I added to CS-Cart manually. Do I need to add quotes around the entire fields in Filemaker Pro before exporting values like the above from Filemaker in order to export a tab delimited CSV from Filemaker which will import correctly into CS-Cart?



It would be great to avoid using quotes around fields containing special characters as I might even have quotes in the content of my description fields.



Regarding headers: Does CS-Cart look for field name headers when importing CSV files? If so I will need to add them in Filemaker. If not, I'm afraid that adding them will add a record to CS-Cart with the field names as field values.



Thanks for any insights.

Ive never used quotes and never had a problem. Either Tab or commas as my seperator.



Just do 1 of each, in and out and see how you get on



also yes the headers are required again, export 1 product to see this



John

[quote name='johnbol1' timestamp='1389526222' post='174957']

Ive never used quotes and never had a problem. Either Tab or commas as my seperator.



Just do 1 of each, in and out and see how you get on



also yes the headers are required again, export 1 product to see this



John

[/quote]



Thanks John. Things are coming together. I have been putting off experimenting with imports as the products added are needed by the designer. Later this week I'll be able to delete my test products/images and try some imports. I suspect tab delimited CSV from Filemaker will work fine with the possibility of problems in text fields which have tabs, in which case I can just strip them out of my data.



Tom

If you are able to choose between tab or comma I would prefer comma.

Comma is less “error sensitive” than tabs.

cs-cart uses some characters internally like '#', '@', etc. So if they're quoted, they are not confused with internal use.

[quote name='Mirco' timestamp='1389533759' post='174961']

If you are able to choose between tab or comma I would prefer comma.

Comma is less “error sensitive” than tabs.

[/quote]



Thanks. Will keep in mind but unfortunately Filemaker Pro only supports import/export of tab delimited CSVs.

[quote name='tbirnseth' timestamp='1389566111' post='174990']

cs-cart uses some characters internally like '#', '@', etc. So if they're quoted, they are not confused with internal use.

[/quote]



Thanks for comment. Do you mean the entire field should be quoted? For example, image paths have a “#” just after the file extension so the entire “Detailed” field (it's a file path plus JSON) should be quoted?



Thanks agin for any insights.

In CSV, it is always best to quote the whole column.

[quote name='tbirnseth' timestamp='1389647529' post='175058']

In CSV, it is always best to quote the whole column.

[/quote]



Thanks. That's what I've done and I'm able to export-import between Filemaker Pro and CS-Cart fine. BTW, I was mistaken about Filemaker Pro only supporting export-import of TAB delim CSVs. It will do commas as well as various Excel and DB formats. It's an excellent tool for getting data in to CS-Cart or working with CS-Cart data as it's relational and features a full complement of calculation functions. Since I'm a database rather than spreadsheet person it's perfect for my needs.