General information
Category:
Coding, syntax & commands
Title:
Opening text file in Excel, fixed width, columns
Hi, I have just realized that Excel can open a text file, containing columns. And that it can place the columns ion the text file into Excel columns --- by using the fixed width options from File -- Open -- text file -- fixed widths.
How would I then convert the following, taken from a recording the keystrokes in Excel -- into vfp excel automation ccode.
Workbooks.OpenText Filename:="C:\d\tax\200210.txt", Origin:=xlWindows, _
StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(14 _
, 1), Array(42, 1), Array(67, 1), Array(70, 1), Array(83, 1))
My guess that it would be something remotely like this but I can't figure out to get the Array stuff in there?
o = CREATEOBJECT('excel.application')
o.Application.Workbooks.Open(The_File, extra parameters, extra ?, extra? , ....... )
any help would be greaqtly appreciated.
Thanks
Steve
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only