L
Lee
I have been trying to use the following code and Visual
Basic.NET does not seem to recognize "xlDelimited"
and "xlDoubleQuote". Do I need to do something to get
the software to recognize these Excel constants?
Thanks,
Lee
Dim app as Excel.Application
Dim strFileName as String
app = CType(CreateObject("Excel.Application"), _
Excel.Application)
OpenFileDialog1.Filter = "Data (*.txt)|*.txt"
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
strFileName = OpenFileDialog1.FileName
book = app.Workbooks.OpenText(strFileName, _
Origin:=437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=True, Space:=True)
app.Visible = True
End If
Basic.NET does not seem to recognize "xlDelimited"
and "xlDoubleQuote". Do I need to do something to get
the software to recognize these Excel constants?
Thanks,
Lee
Dim app as Excel.Application
Dim strFileName as String
app = CType(CreateObject("Excel.Application"), _
Excel.Application)
OpenFileDialog1.Filter = "Data (*.txt)|*.txt"
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
strFileName = OpenFileDialog1.FileName
book = app.Workbooks.OpenText(strFileName, _
Origin:=437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=True, Space:=True)
app.Visible = True
End If