G
Guest
Hi Folks
I am trying to import data from text file to
excel using OpenText method. It works fine . Can i pass a
string contains list of fields to be imported and thir
data type.
Workbooks.OpenText
FileName:="C:\ips\ips.txt", Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:=Array
(Array(1, 2))
What i mean is
StrCode = "Array(Array(1,2))"
Workbooks.OpenText FileName:="C:\ips\ips.txt",
Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:= StrCode
Here i assign FieldInfo to variable strCode.
If u have any soultion please let me know.
Thanks & Regards
Niraj
I am trying to import data from text file to
excel using OpenText method. It works fine . Can i pass a
string contains list of fields to be imported and thir
data type.
Workbooks.OpenText
FileName:="C:\ips\ips.txt", Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:=Array
(Array(1, 2))
What i mean is
StrCode = "Array(Array(1,2))"
Workbooks.OpenText FileName:="C:\ips\ips.txt",
Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=False, Comma:=True _
, Space:=False, Other:=False, FieldInfo:= StrCode
Here i assign FieldInfo to variable strCode.
If u have any soultion please let me know.
Thanks & Regards
Niraj