Stop Thinking 'Is XML Excel?' — Here’s What It Really Means

The first thing most people do when they see an XML file attached to an email or downloaded from a vendor is double-click it — expecting Excel to open it like a .xlsx file. That’s almost always the wrong move. Excel doesn’t natively run XML like a spreadsheet; it maps, imports, or exports it using structured rules. You’ll get a blank screen, an error about schemas, or worse — garbled text in column A. (Trust me, I learned this the hard way after spending 47 minutes trying to ‘open’ a 12MB SAP export named invoice_data_2024Q2.xml.)

Quick Answer

No — Excel is not XML. XML is a markup language for structuring data; Excel is a spreadsheet application. But Excel can import XML as tables, export ranges to XML, and map XML schemas to worksheets — if you use the right method and avoid the default double-click trap.

All the Methods

MethodTime for 10K rowsAccuracyDifficulty
Import via Data > Get Data > From File > From XML~18 secHigh (auto-detects hierarchy)Low
Open with XML Source pane + Schema mapping~2 min (setup)Very High (schema-bound)Medium-High
Paste special > Text (then parse with TEXTSPLIT)~45 secMedium (depends on consistency)Medium
Export range to XML using mapped schema~6 sec (after mapping)Very High (validates against XSD)High
Power Query XML.Native() (M code)~12 secHighest (handles nested arrays)High

Method 1 Deep Dive

This is the fastest, safest path for one-off imports — especially if you’re handed raw XML without a schema. Go to Data tab → Get Data → From File → From XML. Excel will scan the file and show a preview. Click Load. It lands in a new worksheet as a table — but here’s the counterintuitive part: don’t edit that table directly. If you delete a row or sort it, Excel breaks the XML link. Instead, copy the data (Ctrl+C), then paste values into A1 of a clean sheet (Alt+E+S+V).

Try it with this snippet (save as orders.xml):

<?xml version="1.0" encoding="UTF-8"?>
<Orders>
  <Order ID="ORD-7821" Date="2024-03-15">
    <Customer>Sarah Chen</Customer>
    <Amount>45200</Amount>
    <Status>Shipped</Status>
  </Order>
  <Order ID="ORD-7822" Date="2024-03-16">
    <Customer>Acme Corp</Customer>
    <Amount>12950</Amount>
    <Status>Pending</Status>
  </Order>
</Orders>

After importing, you’ll see columns: ID, Date, Customer, Amount, Status. The ID and Date come from attributes — Excel pulls those automatically. Values go into rows starting at A2. No manual parsing needed.

Method 2 Deep Dive

This is for repeatable, validation-critical work — say, importing daily EDI files that must match your company’s XSD schema. First, go to Developer tab → XML → XML Source. If Developer isn’t visible, enable it via File > Options > Customize Ribbon. Then click XML Maps → Add and select your .xsd file (not the .xml!). You’ll see a tree of elements on the right. Drag Customer onto cell A1, Amount onto B1, etc. Now, go to Data tab → Get Data → From File → From XML — but this time, choose Import to existing worksheet and point to your mapped range (A1:E100). Excel will auto-fill only cells bound to the schema.

Here’s what most miss: the mapping stays active even after closing/reopening. So next time, just drop a new orders_v2.xml into the same folder and hit Alt+A+R+R (Data > Refresh All). Your A1:E100 updates — and if a field violates the XSD (e.g., <Amount>abc</Amount>), Excel throws a clear error instead of silently inserting #N/A.

Sample mapped output (starting at A1):

IDDateCustomerAmountStatus
ORD-78212024-03-15Sarah Chen45200Shipped
ORD-78222024-03-16Acme Corp12950Pending
ORD-78232024-03-17Terra Logistics8760Delivered
ORD-78242024-03-18Nexus Labs32400Shipped
ORD-78252024-03-19Vista Systems6500Processing

Cheat Sheet

ActionShortcut / StepsNotes
Import XML (no schema)Data → Get Data → From File → From XML → LoadPaste values immediately if editing needed
Open XML Source paneAlt+D+L+X (or Developer → XML → XML Source)Requires Developer tab enabled
Refresh all XML mapsAlt+A+R+ROnly works if maps are defined and data linked
Export range as XMLRight-click mapped range → Export → XML...Fails if data violates schema — good for QA
Split raw XML text=TEXTSPLIT(A1,"","")Use with TRIM() and SUBSTITUTE() for cleanup
Validate XML structureOnline: https://www.xmlvalidation.com/ (paste content)Never skip this before mapping — saves hours
Rachel Torres

Rachel Torres

Rachel coaches teams on email management and digital communication best practices. She has trained over 5