How to Create XML Mapping in Excel (with Easy Steps)

In this article, we’ll learn simple steps to create XML mapping in Excel. We often need to change the type of a file so that it can be used with different programs and operating systems. Based on what they need, XML and XLSX are two of the most popular file types for Android and Windows. So converting XML to Excel or Excel to XML is a very important scheme these days.


Watch Video – Create XML Mapping in Excel


How to Create XML Mapping in Excel: with Easy Steps

There are 3main steps to create XML Mapping in Excel. The main portion is choosing an XML file which we will follow for the structure. Then we will put that structure or format into the Excel workbook. And finally, we will export our Excel file as XML or keep it as it is if we need to. So those procedures are described below.


Step 1: Choosing XML File

For creating XML mapping, we will require an XML file that we will follow to create a new XML file with our desired data. Here in our case, we will follow the XML file code attached in the below image. We need the structure only to create XML mapping. If the XML file only contains structure, that is also okay to work with. We only need the structure for mapping, not any data. Here is a preview of the structure we will use as an example.


Step 2: Mapping XML into Excel File

This step is the main phase where we will start creating XML mapping. For reference, we want to create XML mapping on the following data table.

To create XML mapping we will follow these steps:

  • First, we will go to the Developer tab in the ribbon, and in the XML area select Source.

Procedures to Create XML Mapping in Excel

  • Second, selecting Source will trigger a panel on the right named XML In that panel select XML Maps. A dialog box named XML Maps will appear.

  • Third, we will select Add in the dialog box.

  • Next from that window, select the file that’s structure will be followed. In our case, we need to write the code mentioned earlier and save it as an XML file. Here we saved it as  XML Example.xml.

Procedures to Create XML Mapping in Excel

  • Then we will see a message from Excel like the one below. We will click on OK.

  • Furthermore, press OK in the XML Maps box as well.

Procedures to Create XML Mapping in Excel

  • After that, we will see the structure of the XML Example file on the XML source panel.

Procedures to Create XML Mapping in Excel

  • Consequently, we will drag and drop the field names from the XML Source panel to our table’s respective fields/columns.

  • Finally after doing that we will have the XML mapped in our Excel file.

Procedures to Create XML Mapping in Excel


Step 3: Exporting Excel File as XML File

We need to export our data as an XML file after mapping. So we should follow these steps:

  • Firstly we will select Export in the XML section under the Developer tab in the ribbon.

  • Secondly, we will give our new file a name and save it.


Things to Remember

  • The data type must be the same while mapping a column.
  • Not necessary to have the same number of fields as the XML file has. We may not need to use a column in the XML But all the fields/columns in the workbook must be mapped to export as XML.
  • For this demonstration, we used Microsoft 365. So the interface may vary with other versions.

Download Practice Workbook

You can download the practice workbook and XML structure file from here.


Conclusion

Creating XML mapping in Excel is important as technology is now centralizing file sharing between different platforms. This article will help you to create XML mapping in Excel. If you’re still having trouble with any of these methods, let us know in the comments. Our team is ready to answer all of your questions.


Related Articles

<< Go Back to XML Mapping in Excel | Export Excel to XML | Export Data from Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nasir Muhammad Munim
Nasir Muhammad Munim

Nasir Muhammad Munim has been an Excel and VBA Content Developer for over a year in Exceldemy and published more than 30 articles for the website. He is passionate about exploring new aspects of Excel and VBA. He received his Bachelor of Science in Electrical and Electronic Engineering from the Islamic University of Technology. Apart from creating Excel tutorials, he is interested in developing PostgreSQL, MySQL, and Android applications. He is fascinated by CAD-based designing systems and building... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo