Workbooks.OpenXML (Excel)

Opens an XML data file. Returns a Workbook object.

OpenXML (Filename, Stylesheets, LoadOption)

Dim strFilename As String: strFilename = 
Dim wbOpenXML As Workbook
Set wbOpenXML = Workbooks.OpenXML(Filename:=strFilename)

Arguments

The following argument is required

Filename (String) - The name of the file to open.

The following arguments are optional

Stylesheets (Single) - Either a single value or an array of values that specify which XSL Transformation (XSLT) stylesheet processing instructions to apply.

LoadOption (XlXmlLoadOption) - Specifies how Excel opens the XML data file. Can be one of the XlXmlLoadOption constants.

Possible Values are

xlXmlLoadImportToList Places the contents of the XML data file in an XML table.
xlXmlLoadMapXml Displays the schema of the XML data file in the XML Structure task pane.
xlXmlLoadOpenXml Opens the XML data file. The contents of the file will be flattened.
xlXmlLoadPromptUser Prompts the user to choose how to open the file.