Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening text file in Excel, fixed width, columns
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Opening text file in Excel, fixed width, columns
Miscellaneous
Thread ID:
00743166
Message ID:
00743166
Views:
73
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
Map
View

Click here to load this message in the networking platform