title: Multiple Excel Tables from XML Mapping
body: <p>I'm trying generate an Excel 2007 file (see 1st image below) using sales data in XML.  The tricky part is I'd like a chart for each <code>&lt;item&gt;</code> element (see 2nd image below).  For the final product, I'd be building this logic in vba within an .xltm template that would produce around 800 item sales tables depending on the given XML.</p>
  
  <p>(I've worked alot with Excel VBA and its querytables / workbook connections, but I'm new to the XML side of data importing so bear with me.)</p>
  
  <p>My first thought was to use XML Maps.  I was hoping to be able to replicate the same element mapping multiple times but map it to specific <code>&lt;item name"x"&gt;</code> elements (all via VBA), but it looks like thats not an option (unless its a hidden functionality in VBA that I'm not aware of?).</p>
  
  <p>I could use distinct item names as elements (i.e. <code>&lt;item1&gt;</code>, <code>&lt;item2&gt;</code>, etc) instead of <code>&lt;item&gt;</code>, so each item is its own element that I'd map separately.  Wouldn't this be a bit hacky? I'm new to XML world, and this doesn't sound like this would be considered well-formed. My goal is to use this same concept of generating "bit-sized charts" on many  different reporting purposes, so I'm hoping to find an elegant process.</p>
  
  <p>It seems like my only option is having a hacky XML mapping (see 3rd image below) where each chart is it own element tag, then somehow iterate and place each element's chart on the sheet with VBA.  (Not sure what 800 mappings would to do Excel's performance)</p>
  
  <p>Any advice would be mucho appreciated.  I would think this is a common need for Excel power-users, but I'm having a hard time finding info on this concept. If this concept is possible with other methods (i.e. querytables, etc) I'm open to any solution.  It seems like XML is the best fit for this visual-style reporting as opposed to a tabular-style report.</p>
  
  <p>I have full control on the source XML schema in case it needs restructuring to fit a method. Also, all data/formatting has been dumbed down for the sake of examples.</p>
  
  <p><strong>Report Format Example:</strong><br>
  <img src="https://i.stack.imgur.com/UXF4V.jpg" alt="desc1"></p>
  
  <p><strong>Snippet of XML Data Format:</strong><br>
  <img src="https://i.stack.imgur.com/bhevp.jpg" alt="desc2"></p>
  
  <p><strong>Hacky XML Mapping Method</strong><br>
  <img src="https://i.stack.imgur.com/HNVlb.jpg" alt="desc3"></p>