Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement