View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kristiaan Soomers Kristiaan Soomers is offline
external usenet poster
 
Posts: 2
Default Problem opening a komma separated file with Excel 97

hi all,

I'm having some problems with the above, let's describe
the issue:
I'm working on a windows NT 4.0 machine and I'm using
Excel 97-SR2.
I'm using VBA to open a small komma separated file with
the following code:
workbooks.open Filename:="C:\test.txt",
Origin:=xlWindows, Format:=2
This code puts all the komma separeted fields into
separate collums. This worked perfectly until a few days
ago, now the same code puts the entire content of the file
into a single collumn. There is obviously a problem with
the Format option (2 stands for a komma) which Excel
doesn't interpret correctly anymore.
I tried a slightly different code:
workbooks.open Filename:="C:\test.txt", Origin:=xlWindows,
Format:=6, delimiter:="," (the format:=6 option is used to
override the format and use a custom delimiter) and this
works perfectly again.

I think there's someting wrong with the formatting options
but i'm unable to track down the location of this setting
in Excel (I don't even know if it's possible to change any
of these settings, I doubt it to be quite frankly).

Does anyone have a suggestion?? any help is welcome!

Post it or mail it to

greetz,

Kris