How to Convert XML to Excel (XLSX) — and When CSV Is the Better Choice

You have an XML file. You need to work with it in Excel. That is a common task, and it should be a simple one. This guide shows you how to turn XML into a real Excel file, step by step. It also helps you choose between Excel and CSV, because each format is better for a different job.

If you have never done this before, do not worry. You do not need to write code. You pick the file, check a preview, pick Excel as the format, and download. For the basic idea of rows and columns, our step-by-step guide to converting XML to CSV covers the same first steps in more detail.

First, What Are XML, CSV, and XLSX?

XML is a text file that stores data with tags. A tag is a word in angle brackets, like <order> and </order>. Tags nest inside each other, like boxes inside boxes. Extra facts can sit on the opening tag itself. Those facts are called attributes. An attribute is a name and a value inside the tag, like an order ID or a currency code.

XML is great for sending data between systems. It is not great for reading by eye, for sorting, or for adding up totals. For that work, you need a table with rows and columns.

CSV and XLSX are the two main table formats. They look alike at first glance, but they are built in very different ways.

CSV is plain text. The name stands for Comma-Separated Values. Each line is one row, and commas split the line into columns. There is nothing in the file but data. No colors, no bold text, no formulas, and no extra sheets.

XLSX is a real spreadsheet file. It is the file format Excel saves by default. An XLSX file can hold formatting, like bold headers and colors. It can hold data types, so a cell can be stored as a number, a date, or text. It can hold formulas that add up totals. And it can hold more than one sheet in one file, so you can keep orders on one sheet and notes on another.

In short: CSV is data in its most plain form. XLSX is data plus layout, types, and sheets. Which one you should pick depends on what happens next with the file.

CSV vs XLSX at a Glance

This table sums up the main differences. Keep it in mind as you read the rest of the guide.

PointCSVXLSX (Excel)
File typePlain text fileReal spreadsheet file
FormattingNone — no colors, bold, or column widthsColors, bold, borders, and set column widths
Numbers and datesStored as plain text; the app that opens it guesses the typeStored with a type, like number, date, or text
File sizeSmall; text onlyLarger; holds formatting, types, and sheets
Opens whereAlmost any app, tool, or systemExcel, Google Sheets, LibreOffice, and similar apps
Best forImports, databases, feeds, and big filesReports, totals, sharing, and work by hand

Neither format wins at all jobs. The sections below walk through when to pick each one, and what can go wrong with each.

A Small Worked Example

Here is a short XML file with three orders. Each order uses attributes, and each order holds child tags for the buyer, the item, and the total.

<?xml version="1.0" encoding="UTF-8"?>
<orders>
  <order id="ORD-501" currency="USD" channel="web">
    <customer>Anna Lee</customer>
    <item>Blue Notebook</item>
    <total>17.00</total>
    <date>2026-11-01</date>
  </order>
  <order id="ORD-502" currency="USD" channel="store">
    <customer>Ben Ortiz</customer>
    <item>Red Pen Set</item>
    <total>4.25</total>
    <date>2026-11-02</date>
  </order>
  <order id="ORD-503" currency="EUR" channel="web">
    <customer>Carla Novak</customer>
    <item>Desk Lamp</item>
    <total>22.00</total>
    <date>2026-11-03</date>
  </order>
</orders>

The repeating tag here is order. That means each order becomes one row. The facts on the tag — id, currency, and channel — become columns too. Their names use the @ sign, so order@id means the id attribute on the order tag.

Here is the result, as you would see it in Excel:

order@idorder@currencyorder@channelcustomeritemtotaldate
ORD-501USDwebAnna LeeBlue Notebook17.002026-11-01
ORD-502USDstoreBen OrtizRed Pen Set4.252026-11-02
ORD-503EURwebCarla NovakDesk Lamp22.002026-11-03

Three orders in the XML gave three rows in the sheet, plus a header row. No attribute was lost. The ID, the currency, and the sales channel all made it into the table, next to the child values.

How to Convert XML to Excel, Step by Step

Step 1: Check Your XML File

Open the file in a text app and take a quick look. Tags should open and close in pairs, and quote marks should wrap each attribute value. If the file is broken, XmlToCsv gives you a clear error with the line number and the column number, so you can find the fault and fix it. A file with a missing closing tag will not convert well in any tool, so this short check is worth your time.

Step 2: Upload the File or Paste the Text

Add your XML file to the tool, or paste the text for a small test. Large files are read in small pieces, not loaded all at once. This way of working is called streaming. Streaming keeps memory use low, so big files are less likely to fail. If you work with very big files, read how to convert a large XML file without running out of memory before you start.

File size limits depend on your plan. Free allows files up to 2 MB. Starter allows files up to 25 MB. Pro allows files up to 100 MB.

Step 3: Check the Row Element

The row element is the repeating tag that becomes one row. In the example above, it is order. The tool finds the row element for you by looking for the tag that repeats in a clear pattern.

Check the auto choice. If one row should be one order, keep order. If one row should be one item inside an order, pick the item tag instead. You can pick a different tag from the list, or type a path by hand. A path is the chain of tags from the top of the file down to the tag you want.

This is the step that shapes your whole table, so take a few seconds to get it right.

Step 4: Check the Preview and the Columns

Before you download, look at the table preview. The preview shows the first rows of your result on screen. Check that the column names make sense, that each row holds one full record, and that no key column is missing.

Look in particular for the attribute columns, like order@id. Attributes often hold IDs and codes you need later. You can rename a column to a name your team knows, like Order ID, and you can remove columns you do not need. Keep the values themselves as they are at this stage. You can format them in Excel after you download the file.

Step 5: Choose How to Handle Repeated Values

Some records hold a list inside them. One order may have two or three items. You have two choices. You can join the values in one cell with "; " between them, so the order stays on one row. Or you can expand the values to one row per value, so each item gets its own row.

Joined values are neat for simple reading. Expanded rows are better for counting and totals. If you plan to group and sum your data, expanded rows help you turn repeated values into a pivot-ready table with much less clean-up work later.

Step 6: Pick XLSX and Download

Choose XLSX as the export format and download the file. Give it a clear name with the date or source, like orders-2026-11-06.xlsx. Open it in Excel and check the row count at once. The number of data rows should match the number of row elements in your XML. In our example, three orders must give three rows.

That is the whole process. The steps are the same as a CSV conversion up to the last step. Only the format you pick at download time changes.

When Excel Is the Better Choice

Pick XLSX when the file is meant for people to read and work with by hand. These are the most common cases.

You Need Formatting That Sticks

In Excel, you can make the header row bold, add colors to flag rows, freeze the top row, and set column widths so text fits. When you save the file, that work stays in the file. The next person who opens it sees the same neat table. In CSV, none of that can be saved. Each person who opens a CSV has to set it up again from scratch.

You Need Totals and Simple Math

A spreadsheet can add a column, count rows, and show a total at the bottom. You can also sort and filter with a few clicks, and build a quick chart for a meeting. If your next step is to answer questions like “What were sales by channel last month?”, Excel is the right home for the data.

You Share the File With Non-Technical People

Many people know Excel and feel safe in it. Few feel safe with a raw XML file or a plain text CSV. An XLSX file opens with a double click, looks like a normal sheet, and needs no import steps. If you send a file to a manager, a client, or a bookkeeper, Excel cuts down on back-and-forth questions.

You Need More Than One Sheet

One XLSX file can hold many sheets. You might put orders on one sheet, a short summary on a second, and notes on a third. That keeps one report in one file. CSV holds one table only. To split CSV data, you need many files.

A Note of Care: Leading Zeros and Long Numbers in Excel

Excel is helpful with numbers, but at times it helps too much. You should know two pitfalls before you trust a sheet.

First, leading zeros. A code like 00123 is text, even if it looks like a number. When Excel treats it as a number, it drops the zeros and shows 123. That can break product codes, ZIP codes, and account codes. To keep the zeros, the column must be held as text. Check code columns right after you open the file, and if the zeros are gone, treat that column as text on import or add the zeros back from the source file.

Second, long numbers. Excel stores numbers with a set limit of exact digits. A very long number, like a 20-digit ID, can be rounded in the last digits when Excel treats it as a number. Rounded ID digits mean the ID no longer matches your other systems. Long IDs should be held as text too, not as numbers.

These are Excel traits, not faults in your XML or in the conversion. The fix is simple care: check ID and code columns first, keep them as text, and spot-check a few long values against the source file. Dates need the same care. Check that a date column shows real dates, and that day and month are not swapped.

When CSV Is the Better Choice

Pick CSV when the file is meant for a system, not for a person. CSV is the plain, safe choice in these cases.

You Import Into Other Software

Shop systems, ad tools, email tools, and stock systems all accept CSV imports. Many of them do not accept XLSX at all, or accept it with odd quirks. CSV has been the import format for years, and the steps are well known. If a help page says “upload your file,” it almost always means CSV.

You Load Data Into a Database

A database wants clean, plain data with clear columns. CSV gives it just that. There is no formatting to strip out, no hidden sheets, and no formulas to misread. One file, one table, one header row. That is the shape database tools expect.

You Send a Feed That Runs Again and Again

Product feeds and stock feeds run on a schedule. The same file shape goes out each day or each week. CSV is small, fast to write, and easy for the other side to check. If a feed breaks, a plain text file is also easier to open and scan for the bad row.

You Work With Big Files

CSV files are smaller than XLSX files with the same data, because they hold text only. Small files move faster, store more cheaply, and open in more tools. For very large tables, plain text is also less likely to strain a simple app. On XmlToCsv, the Free plan exports up to 5,000 rows per file, and the conversion itself uses streaming, so the file size — up to 2 MB on Free, 25 MB on Starter, and 100 MB on Pro — matters more than the row count in most cases.

You Keep Files in Version Control

Version control tools track changes to text files line by line. Because CSV is text, you can see exactly which row changed between two versions. XLSX is not plain text, so the tool can only say the file changed, not what changed inside it. Teams that store data files with their code almost always pick CSV for this reason.

Plans, Batches, and Saved Templates

If you convert a file once in a while, the Free plan covers a lot: 10 conversions a month, files up to 2 MB, and exports up to 5,000 rows. Both CSV and XLSX export are included, along with the on-screen preview.

Starter costs $9 a month. It gives you 300 conversions a month, files up to 25 MB, and batches of 10 files at once. Pro costs $19 a month. It gives you 2,000 conversions a month, files up to 100 MB, and batches of 50 files at once.

The paid plans add one feature that matters most for repeat work: saved field mapping templates. A template saves your column choices — which columns you renamed and which you removed — so you can apply the same setup to the next file in one pick. If the same supplier sends you the same XML shape each week, a template removes the setup work and the risk of a missed rename. You can save a mapping template for files you convert every week and reuse it for each new file that arrives.

Start free. Move up when you hit a real limit: a file that is too big, a month with too many conversions, or the same setup work done one time too many.

Common Problems in Excel, and Quick Fixes

Columns All Land in One Cell

If your whole table shows up in the first column, the file was likely saved or opened with the wrong split rule. Make sure the file you open is the XLSX file from your download, not the XML or a renamed file. XLSX does not use commas to split columns, so a table stuck in one cell is a sign the wrong file or format was opened.

Dates Look Wrong

If dates show as plain numbers, the cells hold date values but lack date formatting. Select the column in Excel and apply a date format. If day and month look swapped, check the source XML order and be careful with import settings that assume a different date order.

Totals Do Not Add Up

Check for values stored as text. A total column where some cells are text will sum low, because text cells are skipped. Also check for rows you did not expect, like expanded rows from repeated values. Expanded rows repeat the other facts of a record, so a total over all rows may count one order more than once.

A Code Lost Its Zeros

This is the leading-zero pitfall from the section above. The true value is still in your XML and in a CSV export of the same data. In Excel, hold the column as text, and bring the codes in again if you need the exact form.

Frequently Asked Questions

Is XLSX better than CSV?

Neither is better in all cases. XLSX is better for people: formatting, totals, and sharing. CSV is better for systems: imports, databases, feeds, and big files. Pick based on what happens next with the file.

Can I get both formats from the same XML?

Yes. The steps are the same until the download step. Run the conversion once, download the XLSX file, then download the CSV file as well if you need it. The rows and columns will match, because they come from the same settings.

Will my attributes show up in Excel?

Yes. Attributes are kept as columns, named like order@id: the element name, the @ sign, and the attribute name. You can rename those columns before you download, or in Excel after you open the file.

Why does Excel change my numbers?

Excel tries to guess the type of each cell. That guess can drop leading zeros from codes and round very long numbers. Keep ID and code columns as text, and check a few values against the source XML after you open the file.

What if my XML file is very large?

Use a plan that fits the file size — up to 25 MB on Starter or 100 MB on Pro — and let streaming do the work. Check the preview first, and confirm the row count after you open the sheet. If a sheet is too big to work with by hand, CSV may be the better target format.

Do I need Excel installed to open an XLSX file?

No. Google Sheets and LibreOffice can also open XLSX files, and they keep most formatting and types. Excel gives the closest match to the file format, but it is not the only choice.

Summary

To convert XML to Excel, check the file, upload it, confirm the row element, review the preview and the attribute columns, choose how repeated values are handled, and download as XLSX. Then check the row count, the code columns, and the dates as soon as you open the sheet.

Choose Excel when people will read, format, total, and share the data. Choose CSV when a system will import it, load it, or store it. Many teams use both: CSV as the clean master copy, and XLSX as the copy people work in. With the right format picked for the job, your XML data stays complete, clear, and ready to use.

References

← All guides