I\'ve got a bit of VBA that is loading an XML file through VBA. However when it is imported it is all in one column and not split into a table.
When I manually impo
I used a few sections from other sections of code I've found. The below code will prompt the user to select the XML file you want and allows them to simply add/import the selected file into their existing mapping without opening a new file.
Sub Import_XML()
'
' Import_XML Macro
'
'Select the file
Fname = Application.GetOpenFilename(FileFilter:="xml files (*.xml), *.xml", MultiSelect:=False)
'Check if file selected
If Fname = False Then
Exit Sub
Else
End If
'Import selected XML file into existing, custom mapping
Range("B5").Select
ActiveWorkbook.XmlMaps("Result_file_Map").Import URL:=Fname
End Sub