a_jam_sandwich
Well-known member
Currently I have a problem with excel running the code below works on Excel 2002 but on Excel 2000 is creates and exception
nullreferenceexception : Object reference to set to instance of object
Im using the 10.0 excel comm object
Anyone have any ideas?
Thx
Andy
nullreferenceexception : Object reference to set to instance of object
Im using the 10.0 excel comm object
Code:
oExcel As New Excel.Application
This is the line where it fails to open the file.
oExcel.Workbooks.OpenText("C:\test.csv", Type.Missing, 1, Excel.XlTextParsingType.xlDelimited, _
Excel.XlTextQualifier.xlTextQualifierNone, _
Type.Missing, Type.Missing, Type.Missing, True, Type.Missing, _
Type.Missing, Type.Missing, Type.Missing, Type.Missing, _
Type.Missing, Type.Missing, Type.Missing, Type.Missing) (Filename, StartRow:=3, DataType:=Excel.XlTextParsingType.xlDelimited, Comma:=True)
oExcel.visible = True
oExcel = Nothing
Anyone have any ideas?
Thx
Andy