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!

Is opening a CSV-file in Excel 2002 different from 2000 or 97

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.

When i open the file in Excel 97 or Excel 2000 there are no problems.

I use the follwing code: Workbooks.Open Filename:=

I have modified the code to
Workbooks.Open Filename:= , Format:=xlCSV, Delimiter:=";"
or
Workbooks.Open Filename:= , Format:=xlCSV, Delimiter:=chr(9)

Because the data in the file are either separatet by semicolons or tabs but when I open the file the data get separatet by the commas instaed of semicolons or Tabs.

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 tabs or semicolons.



Johan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top