Skip to content

XML to Excel Converter

Turn an .xml file into an Excel workbook. Each repeating record becomes a row, and its elements and attributes become columns you can sort and filter.

Updated

Choose a .xml file or drop it here.xml · up to 50 MB · opened on your device, not uploaded

How to convert XML to Excel

  1. Select Choose a .xml file, or drag the file onto the box.
  2. The converter picks the element that repeats most often and shows it as a table. Check that the rows are the records you expected.
  3. Select Download Excel (.xlsx).

To see the result before using your own data, select Try a sample file.

What the workbook looks like

Suppose the file is an order export:

<orders>
  <order number="10231" status="shipped">
    <customer>Northwind Traders</customer>
    <total currency="USD">288.00</total>
  </order>
  <order number="10232" status="open">
    <customer>Blue Harbor Co</customer>
    <total currency="USD">195.60</total>
  </order>
</orders>

The sheet you download has these cells:

A B C D E
1 @number @status customer total.@currency total
2 10231 shipped Northwind Traders USD 288.00
3 10232 open Blue Harbor Co USD 195.60

The mapping is the same every time:

  • The repeated element (order) supplies the rows.
  • Its attributes become columns named with a leading @.
  • Its child elements become columns named after the tag.
  • Attributes on a child are named child.@attribute.
  • Deeper nesting adds more dots, as in shipping.address.city.
  • A child that occurs twice in a record gets a numbered column, such as item_2.

Anything outside the repeated element, such as a file header, is not copied to the sheet.

Turning text into numbers and dates

Every cell in the workbook is text. Excel aligns text to the left and may show a small green triangle in the corner of number-like cells. Convert only the columns you want to calculate with:

  • Numbers. Select the column, then Data > Text to Columns > Finish. Or select the cells, open the warning icon and choose Convert to Number.
  • Dates. The same Text to Columns command converts text such as 2026-03-02. For other layouts, pick Date and the order (DMY, MDY, YMD) in step 3 of the wizard.
  • Leave codes alone. Order numbers, postcodes and SKUs are safest as text.

Text-typed numbers also affect lookups. A VLOOKUP for the number 10231 does not match the text “10231”, so convert both sides to the same type first.

Import XML in Excel without a converter

Power Query

  1. Go to Data > Get Data > From File > From XML.
  2. Select the file and choose Import.
  3. In the Navigator, pick the table of records and select Transform Data.
  4. Expand nested columns with the icon in each column header, set data types, and select Close & Load.

XML maps on the Developer tab

  1. Turn on the Developer tab under File > Options > Customize Ribbon.
  2. Select Developer > Import and choose the file.
  3. If the file has no schema, Excel offers to create one from the data. Accept, then choose where the table goes.

XML maps suit a file layout you receive repeatedly, because the mapping is kept in the workbook. They fail with the message that the map is not exportable or the data cannot be imported when the file has lists inside lists.

Which route to use

This page Power Query XML map
Needs desktop Excel No Yes Yes
Setup None A few steps A few steps
Sets data types No, all text Yes Yes
Handles nested lists Flattens into one row Yes, by expanding Often refuses
Refresh when the file changes Convert again Yes Yes

XML to Google Sheets

Sheets has no XML file import. Convert the file to .xlsx here, then open it in Sheets with File > Import > Upload.

Things that go wrong

  • The parser rejects the file. XML must be well-formed. Unclosed tags and unescaped ampersands are the usual faults.
  • The sheet lists the wrong level. The most frequent element wins. If a catalogue has 50 products and 400 variant elements, the variants become the rows.
  • Hundreds of columns. Wide, deeply nested records flatten into many dotted columns. Hide or delete what you do not need.
  • SUM returns 0. The column is still text. Convert it as described above.
  • Accents are wrong. The file declares one encoding and was saved in another. Re-export it as UTF-8.

Limits

  • Files up to 50 MB, and no more than 1,048,576 rows and 16,384 columns, which is the size of an Excel sheet.
  • One sheet, holding one kind of record. Values only, all stored as text, with no formatting.
  • The preview shows the first 200 rows and 40 columns. The workbook contains every record.
  • If a plain text file is what the next system wants, use XML to CSV.

Questions

How do I convert an XML file to Excel?

Choose the .xml file above, check the table in the preview, and select Download Excel (.xlsx). You get a workbook with one sheet, a header row, and one row per record.

Can Excel open an XML file by itself?

Yes. Use Data > Get Data > From File > From XML, or File > Open and choose As an XML table. Both need desktop Excel, and both can struggle with nested files.

Why are the numbers in my converted sheet stored as text?

XML has no number type, so every value arrives as text and is written that way. This protects codes with leading zeros. To calculate with a column, select it, go to Data > Text to Columns and select Finish.

What columns will I get?

One for each child element and each attribute of the record. Attributes start with @, as in @id, and nested elements use dotted names, as in price.@currency or address.city.

Does it convert an XML Spreadsheet 2003 file?

That format is a full workbook written as XML, and Excel opens it directly with File > Open. Then save it as .xlsx. This converter is meant for data XML such as feeds and exports.

Is my XML uploaded anywhere?

No. The browser parses the file and builds the workbook on your device.

Related