Microsoft Text Driver

I

IgorM

Hi

I have a problem with importing a CSV file using Microsoft Text Driver.
Here is the example of the file format:
1,2005-01-11,"53000020","ZAKU","Szkol-72/05",290,00,0,00,"PLN"

The issue I have is with the line:
1,2005-01-18,"53000059","ZAKU",""Bilans04"-73/05",325,00,0,00

As you can see there are double quotes befor 'Bilans'. The row gets imported
to 'ZAKU' column and no further items in the row are imported.
I tried to import the file using MS Excel and Acces and they imported
correctly:
1 2005-01-18 53000059 ZAKU Bilans04"-73/05" 325 00 0 00


These are the schema file settings I use for the file:
textSource = "[" + Path.GetFileName(filepath) + "]";

colNameHeader = "ColNameHeader=False";

format = "Format=CSVDelimited";

maxScanRows = "MaxScanRows=500";

characterSet = "CharacterSet=ANSI";

decimalSymbol = "DecimalSymbol=.";

What do I do wrong? Can the file be imported correctly using Microsoft Text
Driver?



Kind Regards

Igor
 
J

joecool1969

Hi

I have a problem with importing a CSV file using Microsoft Text Driver.
Here is the example of the file format:
1,2005-01-11,"53000020","ZAKU","Szkol-72/05",290,00,0,00,"PLN"

The issue I have is with the line:
1,2005-01-18,"53000059","ZAKU",""Bilans04"-73/05",325,00,0,00

As you can see there are double quotes befor 'Bilans'. The row gets imported
to 'ZAKU' column and no further items in the row are imported.
I tried to import the file using MS Excel and Acces and they imported
correctly:
      1 2005-01-18 53000059 ZAKU Bilans04"-73/05" 325 00 0 00

These are the schema file settings I use for the file:
textSource = "[" + Path.GetFileName(filepath) + "]";

colNameHeader = "ColNameHeader=False";

format = "Format=CSVDelimited";

maxScanRows = "MaxScanRows=500";

characterSet = "CharacterSet=ANSI";

decimalSymbol = "DecimalSymbol=.";

What do I do wrong? Can the file be imported correctly using Microsoft Text
Driver?

Kind Regards

Igor

I have seen this same problem with the Microsoft Text Driver, and
found no way to handle the data as is. The only fix I founf was if a
field in the CSV file needs to have embedded double quotes, the entire
field needs to be enclosed in double quotes, and the embedded double
quote has to be "doubled up". As in,

"""Bilans04"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top