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
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