You should add somewhere this:

minOccurs="0" maxOccurs="unbounded"

To tell excel that your elements can appear several times.

But you can't add it within the "Root" element.

Try this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Root">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Car" minOccurs="0" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="Brand" type="xsd:string"/>
                            <xsd:element name="Model" type="xsd:string"/>
                            <xsd:element name="Colour" type="xsd:string"/>
                            <xsd:element name="Price" type="xsd:string"/> 
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
Answer from J.Doe on Stack Overflow
Top answer
1 of 3
4

You should add somewhere this:

minOccurs="0" maxOccurs="unbounded"

To tell excel that your elements can appear several times.

But you can't add it within the "Root" element.

Try this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Root">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Car" minOccurs="0" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="Brand" type="xsd:string"/>
                            <xsd:element name="Model" type="xsd:string"/>
                            <xsd:element name="Colour" type="xsd:string"/>
                            <xsd:element name="Price" type="xsd:string"/> 
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
2 of 3
2

I didn't use J.Doe's answer, but I assume that it's correct because it's similar to what I ended up doing. When linking the original XML schema:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Root">
        <xsd:complexType>
            <xsd:sequence>
                <!--Below are the primary vehicle descriptors - essentially the attributes for the cars-->
                <xsd:element name="Brand" type="xsd:string"/>
                <xsd:element name="Model" type="xsd:string"/>
                <xsd:element name="Colour" type="xsd:string"/>
                <xsd:element name="Price" type="xsd:string"/>   
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

Excel assumed that there was only one record in the sheet. The solution to this was to create a second complex element (in addition to the element named "Root") in my schema, which contains >1 of my Root elements. The resultant file looked like this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Car_Table">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="Root" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>  
    </xsd:element>
    <xsd:element name="Root">
        <xsd:complexType>
            <xsd:sequence>
                <!--Below are the primary vehicle descriptors - essentially the attributes for the cars-->
                <xsd:element name="Brand" type="xsd:string"/>
                <xsd:element name="Model" type="xsd:string"/>
                <xsd:element name="Colour" type="xsd:string"/>
                <xsd:element name="Price" type="xsd:string"/>   
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

When adding the schema using Developer > Source > XML Maps > Add, you get a prompt like this:

Select the element which references the other element (as this allows for recursion). In the XML source panel, the map will look like this:

You can then map each element in the schema (Brand, Model, Colour, Price) to the corresponding column in the sheet. Once the schema is mapped to the sheet, your data will look like this:

You can then export the data to XML by going to Developer > Export. After Selecting a filename and directory using the export dialog, the resultant XML file should look something like this:

This was done using Excel 2010, other versions will differ somewhat.

๐ŸŒ
Microsoft Support
support.microsoft.com โ€บ en-us โ€บ office โ€บ map-xml-elements-to-cells-in-an-xml-map-ddb23edf-f5c5-4fbf-b736-b3bf977a0c53
Map XML elements to cells in an XML Map - Microsoft Support
In the Look in list, click the ... create an XML Map based on the XML schema. If the Multiple Roots dialog box appears, choose one of the root nodes defined in the XML schema file....
๐ŸŒ
Reddit
reddit.com โ€บ r/excel โ€บ xml map not applying to entire column
r/excel on Reddit: XML Map not applying to entire column
March 10, 2014 -

I am attempting to export my Excel data using an XML schema. I have already got the XML map and I am trying to apply it to my columns.

Every tutorial I look at, such as this one: http://www.excel-easy.com/examples/xml.html, shows the person simply dragging the item from XML source onto the column at which point it turns blue.

I am trying to do the same, but it does not work. I can apply the "schema element" to one cell in a column, but never anymore. When I apply it to one column it has a small blue outline.

Another related question, is once I have applied the schema to a cell (or hopefully multiple cells after this post), how do I delete that schema from the cells? The only way I have seen so far is to delete the map itself from the workbook.

I am using Excel 2010. Any help would be really appreciated! Thanks!

๐ŸŒ
Google Groups
groups.google.com โ€บ d โ€บ topic โ€บ microsoft.public.excel.misc โ€บ oS-5VPb4HRg
How to XML Map Repeating Rows?
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/8184707/excel-add-a-field-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-excel-file-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 rat
๐ŸŒ
Super User
superuser.com โ€บ questions โ€บ 881557 โ€บ mapping-excel-sheet-to-xml-schema-using-a-column-for-multiple-attributes
Mapping Excel sheet to XML Schema - using a column for multiple attributes - Super User
However, there is a 1:1 relationship in the number of rows for each of these, so it is much more concise in Excel to only give the key columns once. Why can't I map the same column to multiple elements?
๐ŸŒ
PC Review
pcreview.co.uk โ€บ newsgroups โ€บ microsoft excel โ€บ microsoft excel misc
How to XML Map Repeating Rows? | PC Review
November 12, 2009 - 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 ...
๐ŸŒ
Excelbanter
excelbanter.com โ€บ excel-discussion-misc-queries โ€บ 248297-how-xml-map-repeating-rows.html
How to XML Map Repeating Rows? - ExcelBanter
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
๐ŸŒ
Reddit
reddit.com โ€บ r/excel โ€บ xml mapping and importing multiple xml files to a worksheet
r/excel on Reddit: XML Mapping and Importing Multiple XML files to a Worksheet
November 15, 2017 -

I have a whole ton of XML files, each with one top RECORD, and individual elements underneath. For instance, I'll have an ID, ORDERNUMBER, COMPANYNAME,STREETADDRESSS, etc. What I'd like to do is have column headers for each of these XML elements (Col1 = ID, Col2 = Order Number, Col3 = Company Name, etc). I'd then like to import multiple XML files and have that corresponding data fill in down the columns.

Is this possible?

Currently I've tried XML Maps, where I drag the elements into the top row of the worksheet. When I import a file or refresh the XML data, it fills the info in as expected, but it seems as if it can only show one XML files worth of data at a time. There's always only one row with information and the rest is blank.

Thoughts on what I could do or what I'm doing wrong?

Excel experience is... average I suppose. I'm working in Excel 2016.

Find elsewhere
๐ŸŒ
Microsoft Support
support.microsoft.com โ€บ en-us โ€บ office โ€บ overview-of-xml-in-excel-f11faa7e-63ae-4166-b3ac-c9e9752a7d80
Overview of XML in Excel - Microsoft Support
Automatically Merge Elements When Mapping When selected, Excel creates one XML table from multiple fields as they are dropped onto the worksheet. This option works as long as the multiple fields are dropped on the same row, one adjacent to the other.
๐ŸŒ
Udemy
blog.udemy.com โ€บ home โ€บ how to convert data in excel to xml in 7 easy steps
How To Convert Data in Excel to XML in 7 Steps - Udemy Blog
October 24, 2025 - Drag each element individually into its appropriate column, starting at Row 1. Converted columns become part of a table and should turn blue. Do this until all of your columns have been mapped to the XML elements. Once youโ€™ve finished converting each column into an XML element, you can either click on Developer โ€“ Export, or go to File โ€“ Save As, and change the File Type to โ€œXML Data (*.xml).โ€ ยท Save your XML file, and Excel will export it to XML.
๐ŸŒ
Better Solutions
bettersolutions.com โ€บ excel โ€บ xml โ€บ maps.htm
Excel XML - XML Maps
If you want to import multiple XML files into a single workbook you will need to use a different map (and list) for each file. You can create and control the binding using the XML Source task pane. You can view all the currently attached maps by using the drop-down on the XML source task pane.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 22799979 โ€บ mapping-multiple-xml-elements-in-excel
Mapping multiple XML elements in Excel - Stack Overflow
The trouble then is Excel maps the Comment, CreatedOn and CreatedBy onto different rows as shown in the screenshot.
๐ŸŒ
Super User
superuser.com โ€บ questions โ€บ 1130996 โ€บ imported-xml-occupying-multiple-rows
microsoft excel - Imported XML occupying multiple rows? - Super User
Just opening the XML file and I choose the option "Open as an xml table" (translating from french) and there is no schema reference, so Excel made one.
๐ŸŒ
Altova
altova.com โ€บ manual โ€บ Mapforce โ€บ mapforceenterprise โ€บ mff_xlsx_convert_rows.html
Altova MapForce 2026 Enterprise Edition
The mapping illustrated above converts data from both Excel worksheets to XML files. A separate XML file must be generated for each person record from each row in each source worksheet. The file name must identify the department name and have a numeric ID. For example, the file Admin1.xml will store the details of the first person (row) in the "Admin" worksheet, and so on.
๐ŸŒ
C# Corner
c-sharpcorner.com โ€บ article โ€บ mapping-microsoft-excel-columns-with-xml-data-xml-data-inte
Mapping Microsoft Excel columns with XML data (XML data integration) programmatically using a .Net Application.
September 30, 2012 - Just ignore the values in the XML file. You need to have at least two rows to perform the mapping correctly. I think this is a bug in Excel.
๐ŸŒ
TeachExcel
teachexcel.com โ€บ talk โ€บ 4554 โ€บ xml-mapping-to-multiple-columns
XML Mapping to multiple columns. | TeachExcel.com
Hi. I am very new to this. The goal is to export data from Excel to an XML. I have built the schema file but I am running into the issue that I cannot map to more than one column. This is demographic data where there could potentiall be more than one phone number, email or address.
๐ŸŒ
MrExcel
mrexcel.com โ€บ forums โ€บ question forums โ€บ excel questions
Mapping XML elements to multiple cells | MrExcel Message Board
July 18, 2010 - My XML file looks like this name <name>My Product</name> product_set Product Set 1</product_set> product_set Product Set 2</product_set> </product> but I cannot find a way in excel to assign the Product Set 2 as you cannot map an element (product_set) more than once in the excel file.
๐ŸŒ
Microsoft Support
support.microsoft.com โ€บ en-us โ€บ office โ€บ export-xml-data-0b21f51b-56d6-48f0-83d9-a89637cd4360
Export XML data - Microsoft Support
For example, if your worksheet has 70,000 rows, Excel will export 70000 mod 65537 = 4464 rows. Our recommendation is to 1) use xlsx instead or 2) save the file as XML Spreadsheet 2003 (.xml), which will lose the mappings, or 3) delete all rows after 65,536 and then export again which will keep the mappings but lose the data at the end of the file.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 8900758 โ€บ multiple-excel-tables-from-xml-mapping
Multiple Excel Tables from XML Mapping - Stack Overflow
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. ... I have used something like this to create multiple tables in a sheet as well as multiple sheets..