Author Topic: CSV Improved (CSVI) Tips for loading  (Read 3574 times)

caplinq

  • Jr. Member
  • **
  • Posts: 60
CSV Improved (CSVI) Tips for loading
« on: November 20, 2009, 23:12:40 pm »
CSVI is really powerful, if you learn to use it properly.

There are two important tips I learned though:

Tip#1: Use a ^ for the field delimiter.

This was recommended here:
http://www.csvimproved.com/csv-improved-documentation/tutorials/how-to-csvi.html
Gist of it is here:

The field delimiter
The field delimiter separates the different fields in a CSV file. Though this originally is a comma, other characters can also be used. As importing product data usually involves descriptions it is advised to use a character that does not appear anywhere in the file. The recommended character is ^. Another look at the example gives:

field1^field2^field3
tube1^Green, blue and red^Mixed paint

Now the system can recognize each field correctly as it breaks the fields up ^ instead of the comma.

The text delimiter
The text delimiter is used to mark the beginning and end of each text field. This makes it easier and more accurate for the system to determine the beginning and ending of each field. The text delimiter should also be a character that does not appear anywhere else in the file. The recommended character is ~. Changing the example once more shows the following result:

~field1~^~field2~^~field3~
~tube1~^~Green, blue and red~^~Mixed paint~

The data is now easy to distinguish and the system will read it correctly.

To use this with Excel though, you need to do this:
Change the separator in all .csv text files

   1. In Microsoft Windows, click the Start button, and then click Control Panel.
   2. Open the Regional and Language Options dialog box.
   3. Do one of the following:
          * In Windows Vista, click the Formats tab, and then click Customize this format.
          * In Windows XP, click the Regional Options tab, and then click Customize.
   4. Type a new separator in the List separator box.
   5. Click OK twice.

Note   After you change the list separator character for your computer, all programs use the new character as a list separator. You can change the character back to the default character by following the same procedure.

(as explained here: http://office.microsoft.com/en-us/excel/HP100997251033.aspx#Change%20the%20separator%20in%20all%20.csv%20text%20files)

Tip#2: Use checkbox:
File conversion UTF-8 <---> ISO-8859-1
Convert import file to UTF-8

The reason for this, is because I had some characters like 1/4" and 1/2" that did not import otherwise.

Hope this help someone else.

castart

  • Guest
Re: CSV Improved (CSVI) Tips for loading
« Reply #1 on: December 01, 2009, 21:34:24 pm »
Tip#2;
Notepad can convert your file to a UTF-8 encoded file
When using "Save as" you can choose code ANSI to UTF-8 

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: CSV Improved (CSVI) Tips for loading
« Reply #2 on: August 17, 2010, 17:05:39 pm »
You don't need to mess with windows for CSV handling.

Use the free software suite Open Office rather than excel.  http://www.openoffice.org/

This is free software and the spreadsheet allows CSV saving with whatever delimiters you wish.

Lots easier!!

regards
A

Joomla 3.9.20
php 7.3