Convert an Excel sheet into XML

1. Copy and paste from Excel here

Make sure that the first row has the field names. Avoid spaces at the start or end of the field name.

2. Write the XML that's repeated for each row here

This will be copied once for each row of the Excel pasted above, and {{Fields}} will be replaced with values.

3. Click on Convert to see the output

Copy the output above and add headers / footers as required. That's it.


This page helps you convert data in an Excel sheet into XML of almost any form.

You need to set up the Excel source data similar to the input on the left. The first row should have the field names. (Avoid spaces at the beginning and end of the field name.) The remaining rows should have the values for those fields.

Let's say the target XML looks like this:

<?xml version="1.0" encoding="UTF-8"?>
  <num type="int">1</num>
  <text type="str">One</text>
  <num type="int">2</num>
  <text type="str">Two</text>
  ... etc.

This fragment repeats for every row:

<num type="int">{{Number}}</num>
<text type="str">{{Description}}</text>

So type the XML above into the second text box. Anything within {{double curly brackets}} is replaced with the field's value in that row.

Click on the 'Convert' button to get the output. You can copy and paste that into Notepad. You can then add XML headers and footers (like <?xml version="1.0" encoding="UTF-8"?>) at the top and bottom.

This page is a standalone HTML page. You can save it on to your local machine as a HTML file, and it'll run as long as you have Javascript enabled.

In case of trouble, contact Anand.