Open each column of file as text
Posted by Ben Y on September 26, 2000 6:42 PM
I'm currently using this to open text files which have six columns of data:
ChDir "A:\"
Workbooks.OpenText FileName:="A:\sacramento.update2.001", Origin:=xlWindows _
, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=True, OtherChar:="|", FieldInfo:=Array(Array(1, 2 _
), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 2), Array(6, 2))
How do I change the array formula so that I can open a file with any number of columns as text (e.g. FieldInfo:=Array(Array(n, 2))?