Вы можете использовать синтаксический анализатор XML.
Обязательная ссылка через vbe> tools> ссылки на библиотеку Micorsoft XML (v.6 для меня)
Option Explicit
Public Sub test()
Dim xmlDoc As Object
Application.ScreenUpdating = False
Set xmlDoc = CreateObject("MSXML2.DOMDocument")
With xmlDoc
.validateOnParse = True
.setProperty "SelectionLanguage", "XPath"
.async = False
If Not .Load("C:\Users\HarrisQ\Desktop\test.xml") Then
Err.Raise .parseError.ErrorCode, , .parseError.reason
End If
End With
Dim node As IXMLDOMElement, childNode As IXMLDOMElement, nextChildNode As IXMLDOMElement, r As Long, c As Long, attrib As Object
r = 1
For Each node In xmlDoc.SelectNodes("//node")
r = r + 1
With ActiveSheet
.Cells(r, 1) = node.getAttribute("type")
.Cells(r, 2) = node.getAttribute("action") '<== you can hardcode create here as varies from value of attribute
.Cells(r, 3) = node.SelectSingleNode("location").Text
.Cells(r, 4) = node.SelectSingleNode("title").Text
Set childNode = node.SelectSingleNode("category")
.Cells(r, 5) = childNode.getAttribute("name")
c = 6
For Each nextChildNode In childNode.SelectNodes("attribute")
.Cells(r, c) = nextChildNode.getAttribute("name")
c = c + 1
Next
End With
Next
Application.ScreenUpdating = True
End Sub