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....
Discussions

XML Mapping and Importing Multiple XML files to a Worksheet
It sounds like your XML files each have a single record (i.e., Excel row), if they look like this: 12345 3-JCO Jones Co. 123 Somewhere Lane Jonestown IN You either need VBA code to read multiple files, into multiple rows, or you need code (VBA or some other program) to combine multiple XML files so the result (which is ten imported) looks like this: 12345 3-JCO Jones Co. 123 Somewhere Lane Jonestown IN 67895 73-FCO Fred Co. 123 Somewhere Lane Fredstown IN I would probably go further, and have the code combine/reformat the files to a CSV format, then open that in Excel. [edit] fixed second XML file example, added "root" element More on reddit.com
🌐 r/excel
1
1
November 9, 2017
Mapping multiple XML elements in Excel - Stack Overflow
I am trying to map an XML file into an Excel worksheet to create a report. There will be multiple XML files all imported into a single Excel worksheet. I have created an XSD file and I am able to ... More on stackoverflow.com
🌐 stackoverflow.com
April 2, 2014
Mapping XML elements to multiple cells
Hello, I am trying to produce an Excel file filled with data from the XML file. Some of the cells need to have the same element data. However the Microsoft Excel is not allowing to map an XML element to more than one cells. Could somebody know of a way to achieve this result/ solution... More on mrexcel.com
🌐 mrexcel.com
3
0
November 11, 2010
Map multiple excel cells into xml - Stack Overflow
So I can map a cell of Column1 with the element Column1 into XML Schema. I hope this is clear. But I want to map MULTIPLE cells for the element Column1 in the XML Schema. In other words, I want to recive multiple when I export XML file from Excel (one for every row). More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/excel › xml map not applying to entire column
r/excel on Reddit: XML Map not applying to entire column
March 3, 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
🌐
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 ...
🌐
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.
🌐
Excelbanter
excelbanter.com › excel-discussion-misc-queries › 248297-how-xml-map-repeating-rows.html
How to XML Map Repeating Rows? - ExcelBanter
November 12, 2025 - 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
Find elsewhere
🌐
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
February 23, 2015 - 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?
🌐
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 9, 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.

🌐
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.
🌐
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.
🌐
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.
🌐
Better Solutions
bettersolutions.com › excel › xml › xml-source-task-pane.htm
Excel XML - XML Source - XML Source
To map one or more elements to your worksheet, select the elements in the XML Source task pane To select nonadjacent elements, click one element and then hold down the Ctrl key to select other elements. Drag the element(s) to the worksheet location. Excel bolds each element in the Source pane ...
🌐
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.
🌐
Stack Overflow
stackoverflow.com › questions › 22799979 › mapping-multiple-xml-elements-in-excel
Mapping multiple XML elements in Excel - Stack Overflow
April 2, 2014 - The trouble then is Excel maps the Comment, CreatedOn and CreatedBy onto different rows as shown in the screenshot.
🌐
MrExcel
mrexcel.com › forums › question forums › excel questions
Mapping XML elements to multiple cells | MrExcel Message Board
November 11, 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.
🌐
Wisconsin Department of Health Services
dhs.wisconsin.gov › pps › mh-aoda-mapping-xml.pdf pdf
Mapping Your Source Data to XML Wisconsin Department of Health Services 1
Select the XML Maps… button  Add button. ... Click on the heading ns1:detail_record. It should highlight the details. Then right-click on the heading and choose Map Element. Map all the cells that contain data (detail only) e.g (F2:CFxx where xx · is the row ...
🌐
Stack Overflow
stackoverflow.com › questions › 24884898 › map-multiple-excel-cells-into-xml
Map multiple excel cells into xml - Stack Overflow
I've an excel file structured in this way. Column1 Column2 Column3 ... ColumnN 1 Mario Luigi 2 Peach Wario . . . I've a XML Schema (.xds) to map that spreadsheet.
🌐
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..