L
Lee
I have been trying for *many* hours to figure out how to
use the OpenText method in Excel. I have a data file in
text format (ASCII) and I want to import this data into
an Excel worksheet using space delimiting. In other
words, there are spaces between the data. Please refer
to the following code:
Dim app As Excel.Application
Dim book As Excel.Workbook
Dim sheet As Excel.Worksheet
Dim strFileName1 As String = "C:\Temp\Data1.txt"
Dim strFileName2 As String = "C:\Temp\Data2.xls"
app = CType(CreateObject("Excel.Application"),
Excel.Application)
book = CType(app.Workbooks.Open(strFileName2),
Excel.Workbook)
app.Visible = True
Could someone please tell me how to use the OpenText
method in place of the Open method and make it space
delimited? Everything I have tried imports each line of
the data into the first column instead separating out
into different columns.
Thank you in advance,
Lee
use the OpenText method in Excel. I have a data file in
text format (ASCII) and I want to import this data into
an Excel worksheet using space delimiting. In other
words, there are spaces between the data. Please refer
to the following code:
Dim app As Excel.Application
Dim book As Excel.Workbook
Dim sheet As Excel.Worksheet
Dim strFileName1 As String = "C:\Temp\Data1.txt"
Dim strFileName2 As String = "C:\Temp\Data2.xls"
app = CType(CreateObject("Excel.Application"),
Excel.Application)
book = CType(app.Workbooks.Open(strFileName2),
Excel.Workbook)
app.Visible = True
Could someone please tell me how to use the OpenText
method in place of the Open method and make it space
delimited? Everything I have tried imports each line of
the data into the first column instead separating out
into different columns.
Thank you in advance,
Lee