How to XML Map Repeating Rows?
I'm trying to map XML to a range of rows but, for some reason, Excel (2007)
is only mapping it to the first row of the range. I've created an XML file and imported it. Then, I right-click on the root element and choose Map Element. Excel asks "Where do you want to map the XML elements?" I click and drag a range of contiguous cells and it updates the range in the little dialog box. The range displayed include the full range of columns and rows so I hit OK. But then Excel only shows the first row with the blue border. And when I export it only exports the first row. What am I doing wrong? I've done this before successfully with a slightly different map and it was working fine. I can't figure out what I'm doing wrong today. David Salahi |
Answer: How to XML Map Repeating Rows?
Hi David,
It sounds like you're trying to map repeating rows in Excel using XML. Here's a step-by-step guide to help you out:
That should do it! Let me know if you have any questions or if there's anything else I can help you with. Best regards, [Your Name] |
How to XML Map Repeating Rows?
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 |
How to XML Map Repeating Rows?
On Nov 12, 11:56*pm, 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 Hi Dave, I have a similar problem and i've actually tried your solution above to no avail. May I email you my spreadsheet and the sample XML i'm using? I'll really appreciate your help. I'd actually now resorted to mapping each row (1199 rows) in excel to each element in the xml and this is a painful task. I'll really appreciate your assistance in this regard. Thanks in advance. Simon |
Quote:
Thanks Mack |
How to XML Map Repeating Rows?
Oh my goodness. Thank you for taking the time to answer your own question. I've been trying to figure this out for about four hours. Your solution worked fine for me. Life-saver, thanks!!
|
How to XML Map Repeating Rows?
On Thursday, November 12, 2009 at 11:56:02 PM UTC+2, 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 cant thank you enough for posting this. It solved a problem I've been trying to figure out for hours. Thank you |
How to XML Map Repeating Rows?
On Thursday, November 12, 2009 at 4:56:02 PM UTC-5, 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 Thanks |
How to XML Map Repeating Rows?
Il giorno giovedì 12 novembre 2009 22:56:02 UTC+1, DaveLS ha scritto:
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 Thank you, thank you, thank you! |
How to XML Map Repeating Rows?
Thank you - That was driving me nuts
|
How to XML Map Repeating Rows?
Thank you for the solution.
|
How to XML Map Repeating Rows?
Hi Dave
Thanks I was having this exact issue... You are my saviour! ME |
How to XML Map Repeating Rows?
Thanks Dave! The post that keeps on giving!
Cheers, Lloyd |
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 |
How to XML Map Repeating Rows?
dcor,
I have the same problem except for when I dig into my xmlMaps.xml file there are no cases of maxOccurs and only minOccurs. Do you have any idea how to map repeating elements if there's no maxOccurs="1" to change to "unbounded"? |
How to XML Map Repeating Rows?
VÃ*o 03:16:01 UTC+7 Thứ Sáu, ngÃ*y 13 tháng 11 năm 2009, DaveLS đã viết:
I'm trying to map XML to a range of rows but, for some reason, Excel (2007) is only mapping it to the first row of the range. I've created an XML file and imported it. Then, I right-click on the root element and choose Map Element. Excel asks "Where do you want to map the XML elements?" I click and drag a range of contiguous cells and it updates the range in the little dialog box. The range displayed include the full range of columns and rows so I hit OK. But then Excel only shows the first row with the blue border. And when I export it only exports the first row. What am I doing wrong? I've done this before successfully with a slightly different map and it was working fine. I can't figure out what I'm doing wrong today. David Salahi Thank you |
All times are GMT +1. The time now is 09:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com