View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.misc
[email protected] dcorning@gmail.com is offline
external usenet poster
 
Posts: 1
Default How to XML Map Repeating Rows?

On Thursday, November 12, 2009 at 5:56:02 PM UTC-4, DaveLS wrote:
OK, I figured out the answer to my own question. The problem was that the
sample XML that I created to define the XML map had only a single XML node.
You have to have at least two XML nodes or "records" in order to map the node
as a repeating element.

Dave


I had a similar problem but the XML structure was complex enough that some XML files had single records where other XML files had repeating elements, across hundreds of elements.

Here's how I overcame it:
I learned from here that you can dig into the workbook structure of an excel file and access the xml code of the XML map directly: https://stackoverflow.com/questions/...-to-an-xml-map

I followed these instructions to convert an xlsx to zip, unzip, and access the xmlMaps.xml file: http://professor-excel.com/xml-zip-e...ile-structure/

And I used some insight from this thread to do some analysis of the xml file and I did a find / replace to change maxOccurs="1" to maxOccurs="unbounded" for those elements I needed to see as repeating elements rather than single record: https://answers.microsoft.com/en-us/...a-c3a0b94a8b1e

Maybe this will help others in the future :)
DC