Twareintor
Twareintor

Reputation: 41

excel ace.oledb vba connection to csv returning only first column

In VBA Excel (Office 365) trhough using a connection string like "Provider=Microsoft.ACE.OLEDB.12.0;data source=..." and using the command string SELECT * FROM [text;HDR=Yes;FMT=Delimited;Delimiter=';';database=KKS].[kks.csv]; the results are: enter image description here when the CSV source looks like this:

rng;key;component;
"0";"A";"Grid and distribution systems";
"0";"B";"Power transmission and auxiliary power supply";

The schema.ini is:

[kks.csv]
ColNameHeader=True
Format=CSVDelimited
Decimalsymbol=(,)
Delimiter=(;)

I have tried any combination for the connection string and for schema.ini (also removing it completely) and the results are the same at best. Any suggestion? Thank you!

Upvotes: 1

Views: 579

Answers (1)

Dy.Lee
Dy.Lee

Reputation: 7567

change the Schema.ini as below.

[kks.csv]
Format = Delimited(;)

Upvotes: 3

Related Questions