Using Excel to Open XML file like XML List

wayliff

Member
Joined
Feb 5, 2007
Messages
10
Programming Experience
Beginner
I am attempting to open an XML file like an XML List using excel, i'm getting an unhandled null reference exception when it attempts to run the last command...not sure what to make of it.

Can anybody shine the light here? I'm new to vb.net development and going through my learning steps...

Here's the code i'm using...
VB.NET:
Dim oXL As New Microsoft.Office.Interop.Excel.Application
Dim oWB As Microsoft.Office.Interop.Excel.Workbook
Dim oSheet As New Microsoft.Office.Interop.Excel.Worksheet
Dim xlXmlLoadOption1 As Microsoft.Office.Interop.Excel.XlXmlLoadOption
 
 
oXL = CreateObject("Excel.Application")
oXL.Visible = False
oXL.Workbooks.OpenXML(selectfiledlg.FileName.ToString, , xlXmlLoadOption1)
 
Last edited by a moderator:
Back
Top