View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default XL2003 open .CSV problem

Thanks Martin,
Your idea put me on the right track, but the Opentext method worked only
when I changed the file extension from .csv to .txt!

My questions still obtain: why is not XL2003 compatible with XL2000?

Regards,
Stefi


€˛Martin€¯ ezt Ć*rta:

How about:

Workbooks.OpenText Filename:="C:\Myfolder\2005_12.csv",
DataType:=xlDelimited, Semicolon:=True

(I just got this by recording a macro, opening the file, using the import
wizard with a semicolon and then cutting out the needless arguments)

"Stefi" wrote:

Hi All,

Earlier I used XL2000, and I had a macro opening a .CSV file:
Workbooks.Open Filename:="C:\Myfolder\2005_12.csv"
worked correctly, it placed the semicolon-separated data into different
columns (I use a Hungarian version where list separator is semicolon).

Recently I had to upgrade to XL2003 (because I couldn't go without some
feature existing only in XL2003), and this statement doesn't work correctly
in XL2003: it opens the .csv file, but does NOT place the semicolon-separated
data into different columns.

I tried
Workbooks.Open Filename:="C:\Myfolder\2005_12.csv", Format:=4
Workbooks.Open Filename:="C:\Myfolder\2005_12.csv", Format:=6, delimiter:=";"
with the same result.

Can anybody help?

Regards,
Stefi