Convert XML to Excel (XLSX)
Turn an XML file into a sortable Excel sheet in one step.
- Nothing is uploaded
- Free
- No sign-up
Guide
XML to Excel: the complete guide
Last updated 3 min read
About this tool
PrivateCSV converts an XML file into an Excel workbook (.xlsx). It finds the element that repeats, such as <product> or <order>, writes one row for each, and turns child elements and attributes into columns. Plain numbers become Excel numbers while values like 00123 stay text. The XML is streamed in your browser, never uploaded, and you get a sheet ready to sort and filter.
How to convert XML to Excel
- Choose the XML file.
- Leave “Row element” empty to use the detected repeated element, or type its name.
- Keep “Detect numbers and true/false” ticked to get numbers you can calculate with.
- Click Convert to Excel and download the .xlsx file.
Example
Each <order> becomes a row; attributes become @ columns.
<orders>
<order id="1001">
<customer>Ana</customer>
<total currency="EUR">24.90</total>
</order>
<order id="1002">
<customer>Ben</customer>
<total currency="EUR">1200</total>
</order>
</orders>@id | customer | total/@currency | total
1001 | Ana | EUR | 24.9
1002 | Ben | EUR | 1200When you need it
- Checking a feed or an export
- Product feeds, order exports and accounting or banking exports often arrive as XML. In a sheet you can sort, filter and spot problems in minutes.
- Skipping Power Query
- Excel opens XML through Data > Get Data > From File > From XML, then makes you expand nested columns one by one in Power Query. This converter flattens the records into one sheet in a single step.
- Large XML files
- The XML is parsed as a stream rather than loaded as a document tree, so files with tens of thousands of records convert comfortably.
How the XML is laid out in the sheet
- Rows: the shallowest element that repeats becomes the row, unless you name one in “Row element”.
- Columns: child elements are named by their path inside the row, such as customer or address/city.
- Attributes: they become columns starting with @, such as @id or total/@currency.
- Repeated fields inside one record are joined with “; ” in a single cell.
- The first row holds the column names, and columns are sized to their content.
Numbers, text and empty values
With detection on, plain numbers such as 24.90 or 1200 are stored as Excel numbers and true/false as booleans. Values that would change if converted, such as 00123, IDs longer than 15 digits or 1e5, stay text. An element that is missing or empty in a record leaves its cell empty.
Limits to know about
- One sheet of at most 1,048,575 records plus the header row. Larger files are refused before conversion; use XML to CSV instead.
- Namespaces are not resolved: prefixed names such as g:price are kept as they are.
- Lists nested inside a record are joined into one cell rather than spread over extra rows.
- Unlike XML to CSV, the whole table is held in memory to build the workbook, so very large files need a computer rather than a phone.
Frequently asked questions
How do I convert an XML file to Excel?
Choose the file and click Convert to Excel. The repeated element is detected, each occurrence becomes a row, and you download an .xlsx workbook.
How do I open XML in Excel without Power Query?
Convert it here first. The .xlsx file opens directly, already flattened into rows and columns, with no queries or expand steps to set up.
What is the difference between XML and XLS?
XML is a general text format for structured data, readable in any text editor and used by feeds, APIs and exports. XLS is Excel's binary workbook format from Excel 97-2003, replaced by XLSX, which is itself a ZIP of XML files. Excel cannot show arbitrary XML as a clean table, so converting it to .xlsx gives you a sheet you can open anywhere.
Are XML attributes included?
Yes. Each attribute becomes its own column, named with @ (for example @id), or with the element path for attributes of child elements (total/@currency).
What if my XML has more than a million records?
An Excel sheet cannot hold more than 1,048,576 rows. Convert the file with the XML to CSV converter instead, then split the CSV if you need parts that fit in Excel.
Related tools
Go further
Your files never leave your device
PrivateCSV runs every tool inside your browser. No upload, no account, nothing to install.