XML vs Excel (XLSX, XLS): Differences and How to Convert
XML moves data between systems, Excel is where people work with it. Here is how the formats differ, how XLSX and XLS fit in, and how to get one into the other.
Short answer: XML is a text format for moving structured data between systems. Excel (XLSX, or the older XLS) is a spreadsheet file for people to read, sort and calculate. XML can nest data as deep as it needs to, while an Excel sheet is a flat grid of rows and columns. If you received an XML file and need to work with it, convert it to Excel. If a system asks for XML, convert your sheet to XML.
XML vs Excel at a glance
| XML | Excel (XLSX) | |
|---|---|---|
| What it is | A text data format | A spreadsheet file |
| Made for | Systems exchanging data | People reading and calculating |
| Structure | Nested tree, any depth | Flat grid: rows, columns, sheets |
| Opens in | Any text editor, browser or code | Excel, Google Sheets, LibreOffice Calc, Numbers |
| Formulas, charts, formatting | No | Yes |
| Size limit | None in the format | 1,048,576 rows by 16,384 columns per sheet |
| Validation | XSD schema | Data validation rules on cells |
| Typical files | Feeds, e-invoices, bank and tax files, ERP exports | Reports, budgets, lists, analysis |
XML vs XLSX vs XLS
These three get mixed up a lot, partly because they are related:
- XLSX has been Excel's default format since Excel 2007. It is a ZIP archive of XML files (the Office Open XML standard). Rename a
.xlsxto.zip, open it, and you will see the XML inside. - XLS is the older binary format from Excel 97-2003. A sheet holds at most 65,536 rows and 256 columns. Use it only when an old system insists on it.
- XML Spreadsheet 2003 is a third option: Excel can save a sheet as one plain
.xmlfile. It opens in Excel, but it is not the kind of XML other systems send you.
So "XML vs XLSX" is less of an either-or than it sounds. XLSX uses XML on the inside, but packages it as a spreadsheet with sheets, styles and formulas.
Why XML doesn't drop straight into a spreadsheet
XML data is usually nested: an order holds several items, a customer holds several addresses. A sheet has only rows and columns. Take this file:
<orders>
<order id="1042">
<customer>Acme Ltd</customer>
<item sku="A-100" qty="2"/>
<item sku="B-200" qty="1"/>
</order>
</orders>
In a spreadsheet you usually want one row per item, with the order details repeated on each row:
| order id | customer | sku | qty |
|---|---|---|---|
| 1042 | Acme Ltd | A-100 | 2 |
| 1042 | Acme Ltd | B-200 | 1 |
That repeating is the step most tools get wrong. They leave the parent cells empty on the second row, which breaks filters and pivot tables. Our XML to Excel converter has a Copy parent nodes values option for exactly this case, and an Output layout option for other shapes: one column per field, key / value pairs, one row per element, or nested levels split across columns.
Can Excel open XML files directly?
Yes. In Excel for Windows you can open an .xml file directly, or use Data > Get Data > From File > From XML. That works well for simple, flat files.
With nested files, you end up expanding tables inside tables, one column at a time, and very large files can be slow to load. If you get the same kind of file every week, a converter that applies the same layout each time saves you from redoing those steps.
When to keep XML and when to use Excel
Keep it as XML when:
- a system, partner or government portal requires XML,
- the data is deeply nested and must stay that way,
- files are checked against a schema, or
- software reads the file, not a person.
Use Excel when:
- a person needs to read, filter, total or chart the data,
- you are sharing it with colleagues who don't work with data formats, or
- you need to make a quick edit and send it back.
Convert between XML and Excel online
- XML to Excel: turn an XML export, feed or report into an XLSX or XLS sheet. Large files work too, because the conversion runs on our servers, not in your browser (paid plans raise the file size limit).
- Excel to XML: turn a sheet into XML, with the first row as element names, a choice of encoding, and a date format.
- More rows than Excel can hold? XML to CSV has no row limit.
For the step-by-step version, see how to convert XML to Excel.
Frequently asked questions
What is the difference between XML and Excel? XML is a text format that stores data as a tree of tagged elements, for systems to exchange. Excel is a spreadsheet file that stores data in a grid of rows and columns, for people to read and calculate.
Is an XLSX file an XML file? Partly. An XLSX file is a ZIP archive that contains several XML files, one for each sheet plus some for styles and settings. You can't open it as one XML document, but the content inside is XML.
Can I open an XML file in Excel? Yes. Open it directly, or use Data > Get Data > From File > From XML. Simple files load as a table. Nested files need extra steps, or a converter that flattens them for you.
Why does my XML look wrong in Excel? Usually because the data is nested. Excel has to squeeze a tree into a grid, so parent values end up on only one row, or the data lands in several tables. Converting with a layout that repeats parent values gives you one clean table.
How do I convert Excel to XML? Open the Excel to XML converter, upload your .xlsx or .xls file, and download the .xml file. By default, the first row becomes the element names.