Three ways in, for Windows and Mac, and what to do when none of them gives you a usable table.
Updated November 3, 2026
Quick answer
Excel has three ways to read an XML file: Get Data (Power Query), Developer > Import, and File > Open. Get Data is the one to use. It’s the only one that works on both Windows and Mac, and the only one that lets you pick which part of a nested file becomes the rows. The other two are Windows-only for ordinary data exports.
If you just need the data in a spreadsheet, there’s a faster route: drop the file on the converter below and download a ready .xlsx. No dialogs, any Excel version, nothing uploaded.
Or skip the dialogs: convert it to a clean table here
Power Query is Excel’s import tool. It reads the XML, shows you the tables it found, and loads the one you pick. Nested data shows up as cells that hold a whole table, which you expand into columns. A bit of clicking, but you stay in control of the result.
On Windows (Microsoft 365)
Open a blank workbook and go to the Data tab.
Click Get Data > From File > From XML.
Find your file, select it and click Open.
In the Navigator, click the table you want in the list on the left. The preview on the right shows what you’ll get.
Click Load to put it on a new sheet as is, or Transform Data to open the Power Query Editor first.
In the editor, a column that holds Table in every cell is a nested list (the items of each order, say). Click the expand button (two arrows) in its header and pick the fields to expand. Each item becomes its own row, with the order’s fields repeated. Then Home > Close & Load.
In Excel 2016 and earlier the menu is different: Data > From Other Sources > From XML Data Import (Microsoft: Import XML data).
Microsoft is upfront that nested files need work here: “many XML documents have ragged or nested data,” so you may have to do extra data shaping. With one level of items that’s a single expand. With orders holding shipments holding items, it’s several, and each one can multiply your rows.
On a Mac (Microsoft 365, version 16.69 or later)
Go to the Data tab and click Get Data (Power Query).
Choose XML from the list of data sources.
Pick your file and choose the data to import.
Click Load for a new sheet, or Transform Data to shape it in the Power Query Editor, then Home > Close & Load.
This needs Excel for Microsoft 365 for Mac, version 16.69 or later. To check yours, open Excel and choose Excel > About Excel. The feature is for Microsoft 365 subscribers, so a one-off Office license or an older build won’t have it. In that case the converter above is your quickest way in.
Method 2: Developer tab > Import
This is the older XML import, built around XML maps. It’s Windows-only, and it’s hidden until you turn the Developer tab on.
Go to File > Options > Customize Ribbon, tick Developer under Main Tabs, and click OK.
On the Developer tab, click Import.
Select your .xml file and click Import.
If the file doesn’t point to a schema, Excel creates one from the tags in the data. Click OK when it tells you so.
In the Import Data dialog, choose XML table in existing worksheet or XML table in new worksheet, then OK.
The upside: the sheet keeps its XML map, so next month’s file with the same structure can go into the same table. The downside: you get Excel’s guess at the structure, not your choice, and the schema it infers can’t be exported or edited as a file.
This is what most people try first: double-click the file, or File > Open and pick it. On Windows, Excel then asks how to open it. On a Mac, it works differently (more on that below).
The data in an XML table in a new workbook, with a schema Excel infers from the tags.
The file is flat or nearly flat, and you want filters and sorting straight away.
As a read-only workbook
A plain grid of tags and values, opened read-only so you don’t save over the XML. No schema, no map.
You only want to look.
Use the XML Source task pane
An empty sheet and a pane showing the file’s structure. You drag elements onto cells to map them.
You’re building a template you’ll refill with the same kind of file.
If the file links to an XSLT style sheet, you see an Import XML dialog instead, which offers to open it with or without the style sheet. Without it, you get the same tag-and-row grid as the read-only option.
On a Mac there’s no such dialog: the XML Source pane and XML maps behind those options don’t exist there. Excel opens files saved in its own XML Spreadsheet 2003 format without trouble. An ordinary data export either gets laid out however Excel sees fit, or is refused with “The file you are trying to open is not a valid Excel XML Spreadsheet”. That message doesn’t mean your file is broken. Use Method 1 or the converter.
Why Excel shows a mess or refuses the file
“XML parse error”
The file isn’t well-formed XML: a tag that never closes, a stray character, an export that was cut off halfway. Excel won’t import any of it. Our converter tells you the exact line and column where the file breaks (try it above), which is usually enough to see whether the export was truncated. If it was, export it again.
The table is wide, sparse or repeated
Excel builds its table from a schema it guesses from the tags, and you don’t get to say which repeating element is the row. With an order export you might get one row per order with item fields squeezed in, or item rows with no order on them. Power Query (Method 1) fixes this with an expand step. The converter on this page does it by default: one row per item, order fields on every row, and a picker if you want something else.
“Some data was imported as text”
Excel converts a value to text when it can’t match it to a data type, and you’ll need to turn those columns back into numbers or dates before you can calculate with them (Microsoft). Our .xlsx output stores plain decimals as numbers from the start and keeps codes such as zip 00123 as text, so both survive.
The file is too big
An XML table can’t grow past Excel’s 1,048,576-row limit, and a sheet can’t hold more. The converter reads the file in pieces, so size isn’t a problem, and it splits Excel output across sheets when you pass the limit. For one long table, take the CSV.
Google Sheets and Numbers
Neither one imports an XML file. Google Sheets opens CSV and Excel files. Its IMPORTXML function sounds promising, but it fetches XML from a public web address with an XPath query, so it can’t read an export sitting on your computer. Apple Numbers doesn’t import XML either; it opens CSV and .xlsx.
So convert first. Drop the file on the converter above, download CSV or Excel, then use File > Import in Google Sheets, or just open the file in Numbers.
FAQ
How do I open an XML file in Excel?
On Windows with Microsoft 365, go to Data > Get Data > From File > From XML, pick the file, choose the table in the Navigator and click Load. On a Mac, use Data > Get Data (Power Query) and pick XML. For a quick look, File > Open with “As an XML table” also works on Windows.
Why can’t Excel open an XML file?
Three usual reasons. The file is broken, and Excel reports an “XML parse error”. The data would pass Excel’s 1,048,576-row limit. Or you’re on a Mac, where File > Open is built for Excel’s own XML Spreadsheet format and can refuse ordinary data exports. Use Power Query instead, or convert the file to .xlsx.
How do I import XML into Excel on a Mac?
Use Power Query: Data > Get Data (Power Query), choose XML, pick the file, then Load or Transform Data. It needs Excel for Microsoft 365 for Mac, version 16.69 or later (Excel > About Excel shows yours). The Mac has no Developer tab XML import and no XML Source pane. On an older version, convert the file here instead.
Can I open XML in Google Sheets?
Not as a file: Sheets imports CSV and Excel files, not XML. Its IMPORTXML function reads XML from a public web address with an XPath query, which doesn’t help with an export sitting on your computer. Convert the file to CSV or Excel here, then use File > Import in Sheets.
What program opens XML files?
Any web browser or text editor opens an XML file and shows the raw tags. That’s enough to read a config file. For data (orders, invoices, product feeds), Excel can import it with the methods above, or you can turn it into a table here and open the result in any spreadsheet app.
How do I convert an XML file to a readable file?
Turn it into a table. Drop the file on the converter on this page, check the preview, and download it as CSV or Excel. Each record becomes a row and each field a column, which is far easier to read than nested tags. Nothing is uploaded.