format columns as Text while using "Workbooks.OpenText"
Hi,
I am writing code to import text files and set column formats in Office XP.
I tried (goal is to set column 1 and 6 to Text Format):
Workbooks.OpenText Filename:=.FoundFiles(i), startrow:=2,
DataType:=xlDelimited, _
Tab:=True, FieldInfo:=Array(Array(1, 2), Array(6, 2))
With this, Column 1 and 2 become Text instead of 1 and 6. I want to format
the columns properly before I bring any data in - so formatting after the
import is too late for my data.
What am I doing wrong?
Thanks,
Brij
|