Importing large amounts of flat XML files to excel
I have a bunch of XML files that have a flat hierarchy, but each contain a differing amount of (uniquely named) nodes. Example:
<?xml version="1.0" encoding="UTF-8"?>
<SomeName>
<Node1>
DataA
</Node1>
<Node2>
DataB
</Node2>
<Node3>
DataC
</Node3>
<AnotherNode1>
DataD
</AnotherNode1>
<AnotherNode2>
DataE
</AnotherNode2>
<AnotherNode3>
DataF
</AnotherNode3>
<SingleNode>
DataG
</SingleNode>
</SomeName>
I need to import all these files into an excel table with each column bein associated to a specific node.
Example:
Node1 Node2 Node3 An开发者_开发问答otherNode1 AnotherNode2 Anothernode3 SingleNode DataA DataB DataC DataD DataE DataF DataG
Is there some way to batch import these files or convert them first? Thanks!
www.smooks.org will turn almost anything into almost anything else. You could even use XSLT to create a CSV file. how-do-i-write-an-xslt-to-transform-xml-to-csv
Why not use ActiveWorkbook.XmlImport in VBA?
精彩评论