J
Jac Tremblay
Hi,
When I open a text file with Excel 2000 I have to format the whole content
and I think that this is extra work not needed.
I would like to open the text file in a template (.xlt) I have created before.
Is that possible? If so, it must be simple but I cannot figure it out
because there is no Template property in the OpenText Method.
Here is the code I use to open the text file.
' ***
ChDir strPath
Workbooks.OpenText Filename:=strTextFile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, Comma:=True, Space:=False, _
Other:=False, FieldInfo:=Array( _
Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), _
Array(5, 2), Array(6, 2), Array(7, 2), Array(8, 2), _
Array(9, 2), Array(10, 2), Array(11, 2))
' ***
Thanks.
When I open a text file with Excel 2000 I have to format the whole content
and I think that this is extra work not needed.
I would like to open the text file in a template (.xlt) I have created before.
Is that possible? If so, it must be simple but I cannot figure it out
because there is no Template property in the OpenText Method.
Here is the code I use to open the text file.
' ***
ChDir strPath
Workbooks.OpenText Filename:=strTextFile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, Comma:=True, Space:=False, _
Other:=False, FieldInfo:=Array( _
Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), _
Array(5, 2), Array(6, 2), Array(7, 2), Array(8, 2), _
Array(9, 2), Array(10, 2), Array(11, 2))
' ***
Thanks.