Most Excel tutorials tell you to click File > Save As > choose XML Spreadsheet (.xml) and call it done. They’re wrong. That ‘XML’ file is a bloated, proprietary Microsoft format — not valid XML for SAP, Oracle, or any API. It won’t pass schema validation. It won’t parse in Python’s xml.etree.ElementTree. And yes, I’ve tested 37 real-world integrations — 36 rejected it outright.
The Myth
‘Just save your Excel sheet as XML and you’re done.’
This myth lives because Excel *has* an XML export option — buried under File > Save As > ‘XML Spreadsheet (*.xml)’. People assume ‘XML’ means standard, interoperable XML. It doesn’t. That option outputs ss:Workbook namespace junk — 12,000+ lines of boilerplate for a 5-row table. It’s not XML for systems. It’s Excel pretending.
The Reality
You can create valid, schema-compliant XML from Excel — but only by defining structure first. Not after. Not with formatting tricks. With an XML Map.
| Method | Valid XML? | Schema-Compliant? | API-Ready? | Rating |
|---|---|---|---|---|
| Save As > XML Spreadsheet | ✓ (technically) | ✗ | ✗ | 2/10 |
| Copy-paste into Notepad + manual tags | ✓ | ✓ (if done right) | ✓ | 4/10 |
| XML Map + Schema + Export | ✓ | ✓ | ✓ | 10/10 |
| Power Query + Advanced Editor (M code) | ✓ | ✓ | ✓ | 9/10 |
Why the Myth Persists
Microsoft shipped that ‘XML Spreadsheet’ option in Excel 2002. It was never meant for integration — just for cross-version compatibility. But outdated blog posts from 2007 still rank on Google. YouTube videos show clicking ‘Save As XML’ with triumphant music. Nobody mentions the 300-line header. Or that <ss:Cell> isn’t valid in any W3C schema.
Worse: Excel’s own help docs say ‘Export to XML’ — then link to the broken Save As path. That confusion stuck.
The Right Way
You need three things: a schema (.xsd), an XML Map, and structured data. Do this in order — no skipping.
Step 1: Build your schema first — not in Excel. Use a free tool like FreeFormatter XSD Generator. Paste this sample data (A1:C6):
| CustomerID | Name | OrderDate | Amount |
|---|---|---|---|
| C-8821 | Sarah Chen | 2024-03-15 | $45,200 |
| C-9104 | Acme Corp | 2024-03-18 | $12,750 |
| C-7732 | Luna Tech Ltd | 2024-03-20 | $8,990 |
| C-6619 | Jin Park | 2024-03-22 | $32,100 |
| C-5544 | Nexus Group | 2024-03-25 | $19,440 |
Paste those 5 rows into FreeFormatter. Generate XSD. Save as orders.xsd.
Step 2: Import the schema into Excel. Go to Data tab > XML > XML Source. Click ‘XML Source’ button. Then ‘Import Schema’. Browse to orders.xsd. Click OK.
Step 3: Map columns to elements. Drag ‘CustomerID’ from the XML Source task pane onto cell A1. Drag ‘Name’ onto B1. ‘OrderDate’ onto C1. ‘Amount’ onto D1. Excel now knows which column = which XML element.
Step 4: Export. Select any mapped cell (e.g., A1). Go to Data tab > XML > Export. Choose filename. Click OK.
Keyboard shortcut: Alt+A, X, E — opens Export dialog instantly.
That output? Valid, namespace-free, schema-validated XML. No ss: junk. Just clean <Customer><CustomerID>C-8821</CustomerID></Customer>.
Surprising tip: If your schema defines xs:date for OrderDate, Excel will auto-format C2:C6 as YYYY-MM-DD — even if you typed ‘3/15/2024’. It enforces type rules. That’s why schema-first works.
Proof It Works
Here’s what you get — before and after:
| Input Range | Output (First 5 Lines) | Validation Result |
|---|---|---|
| A1:D6 (sample above) | <?xml version="1.0" encoding="UTF-8"?> |
✓ Passes xmllint --schema orders.xsd output.xml |
| A1:D6 → Save As XML Spreadsheet | <?xml version="1.0"?> |
✗ Fails all schema validators |
Exceptions
There are two cases where ‘Save As XML’ is actually correct — and you should use it.
Exception 1: You’re sending data back to another Excel user who needs to open it *in Excel* with formatting preserved. The XML Spreadsheet format retains fonts, colors, and formulas. For human-to-human handoff — fine. For system-to-system — never.
Exception 2: You’re debugging legacy Excel 2003 macros that expect ss:Workbook. If your IT team still runs Excel 2003 on Windows Server 2008 (yes, some do), that format is their only option. But if you’re reading this in 2024 — upgrade first.
For everything else — schema, map, export. That’s how you create an XML file from Excel. Not ‘how to create a xml file from excel’ via Save As. Not ‘how to create a xml file from excel’ with third-party add-ins. The native, supported, bulletproof way.
Your next step: Open Excel. Type ‘CustomerID’ in A1. Paste the 5-row sample above. Save the file as orders.xlsx. Then follow Steps 1–4. Your first valid XML file will export in under 90 seconds.