Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with opening a .csv-file in a excel spreadsheet

Status
Not open for further replies.

JohanBS

Programmer
Sep 19, 2003
4
DK
When I open the .csv-file with VBA in a Excel spreadsheet (excel 2002) the files are not put in the right colums.
The data in the file are separatet by semicolons, but when
I open the file with the following codes:

Workbooks.Open Filename:=
or
Workbooks.Open Filename:= , Format:=xlCSV, Delimiter:=";"

the data get separatet by the commas instaed of semicolons.

The file is no damished because when I open it manually in excel the data are in the right colums. I have also opened the file in wordpad where I can se that the the data are perfectly separatet by the semicolons



Johan
 
The Delimiter works when Format is set to 6 (xlCSV).
There is more to set when opening text file with
[tt]Workbooks.OpenText ...[/tt]

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top