Excel to XML converts one sheet of an .xlsx or .xlsm workbook into a UTF-8 XML file, in your browser, with no XML Map and no Developer tab. The usual job: a supplier portal or an old inventory system wants the product list "as XML", the sheet has 2,400 rows, and Excel answers with a dialog about XML Maps. On a Mac it has no XML Export command at all.
How to convert Excel to XML
- Drop an .xlsx or .xlsm file (up to 50MB) on the box, or click to browse. The file is read in your browser; nothing is uploaded, and the workbook isn't changed.
- If the workbook has several sheets, pick one from the Sheet list. It opens on the first visible sheet with values; hidden sheets are listed with "(hidden)".
- Rename the Root element (default
rows) and the Row element (default row) if the receiving system expects names like products and product. A name that isn't valid XML shows "Written as" with the name that will be used.
- Tick or untick "The first row is the header (it names the elements)". It's ticked for you when the first row with values is all text and more rows follow.
- Choose Values: "As Excel shows them" or "Raw" (the difference is below).
- Read the preview (the first 60 lines, with the total line count), then click Copy XML or Download .xml. sales.xlsx downloads as
sales (xlsx.com).xml; the Orders sheet of a workbook with several sheets downloads as sales Orders (xlsx.com).xml.
Change the sheet, the header box, the value mode or an element name and the XML is rebuilt on the spot, without reading the file again.
What the XML looks like
A two-row order sheet with the headings Order ID, Customer, ZIP, Unit price ($) and Region, the root renamed orders and the row order, comes out like this:
<?xml version="1.0" encoding="UTF-8"?>
<orders>
<order>
<Order_ID>1001</Order_ID>
<Customer>Smith & Sons</Customer>
<ZIP>02134</ZIP>
<Unit_price>$1,234.50</Unit_price>
<Region>East</Region>
</order>
<order>
<Order_ID>1002</Order_ID>
<Customer>Zoë Martin</Customer>
<ZIP>90210</ZIP>
<Unit_price>$89.99</Unit_price>
<Region/>
</order>
</orders>
The ampersand in Smith & Sons became &, which is what keeps the file parseable. The empty Region cell is written as <Region/> instead of being left out, so every record has the same fields in the same order, and an importer that expects five fields gets five. Two headings were also renamed, which the next section explains.
Headings that aren't valid element names
An XML element name can't contain spaces or most punctuation, and can't start with a digit. The converter fixes each heading and lists the renames under the preview, the first six by name and the rest as a count:
| Heading in the sheet | Element name |
|---|
| Order ID | Order_ID |
| Unit price ($) | Unit_price |
| Qty/box | Qty_box |
| 2026 sales | _2026_sales |
| xml_id | _xml_id |
| Café Größe | Café_Größe |
| Nº | N |
| (blank, in column C) | Column_C |
| Amount, then amount | Amount, amount_2 |
Names beginning with "xml" in any case are reserved by the XML spec, hence _xml_id. Accented and non-Latin letters stay. Two headings that differ only in case get a suffix, because a reader that ignores case would merge them. Untick the header box and the first row becomes data, with elements named after the column letters: <A>, <B>, <C>.
Displayed values or raw values
Excel stores one thing and shows another. A ZIP code shown as 02134 is often the number 2134 with a 00000 format, and 12.5% is stored as 0.125. The Values option decides which of the two lands in the XML:
| Cell | As Excel shows them | Raw |
|---|
| 2134, formatted 00000 | 02134 | 2134 |
| 0.125, formatted as a percentage | 12.5% | 0.125 |
| 1234.5, formatted as currency | $1,234.50 | 1234.5 |
| 4 March 2026, formatted d mmm yyyy | 4 Mar 2026 | 2026-03-04 |
| TRUE | TRUE | true |
Pick Raw when a program reads the file. Its numbers, dates and true/false are the forms XML Schema's decimal, date and boolean types expect, a number is written in full (0.0000001, never 1E-07), and a date with a time comes out as 2026-03-05T14:30:00. Pick "As Excel shows them" when the receiver wants what's on screen, or when codes with leading zeros matter more than numbers. If you need both, store the codes as text in Excel first: text is written as text in either mode.
Formulas are written as their last calculated result. Files saved by some programs other than Excel store formulas with no result; those cells come out empty, the page says how many, and opening and saving the file in Excel fixes it.
Why Excel won't export your sheet as XML
Excel's only route to record XML runs through an XML Map, and that route breaks in ways the error messages don't explain.
"The XML maps in this workbook are not exportable." Excel can import structures it can't export. A list of lists (order lines repeating inside orders) or elements whose relationship to each other can't be kept will stop the export, and the Microsoft Q&A answer is that this is a limitation of Excel. It bites hardest when you opened an XML file, edited it, and tried to save it back.
No map at all. File > Save As > XML Data looks like the obvious route, then fails because the workbook has no mapped ranges. XML Spreadsheet 2003, the other XML entry in the Save As list, does save, but its file is Microsoft's SpreadsheetML: <Workbook>, <Worksheet>, <Row>, <Cell>, <Data ss:Type="String">. A system expecting <product><sku> will reject it.
A Mac. Excel for Mac has no XML Source pane and no Export command, so the XML Map route doesn't exist there.
For a flat list of records, you don't need the map. This converter writes the record XML directly from the sheet.
Doing it in Excel without a converter
The XML Map route is the right one when the receiving system publishes a schema (.xsd) with its own element names, attributes, nesting or namespaces: a tax filing or an e-invoice format, say. A valid XML file is not the same as one that matches someone's schema, and this converter only writes its own flat shape. In Excel for Windows:
- Show the Developer tab (File > Options > Customize Ribbon, tick Developer).
- Click Developer > Source to open the XML Source pane, then XML Maps > Add and pick the .xsd. A sample .xml file works too; Excel infers a schema from it.
- Drag each element from the pane onto its column's heading cell.
- Click Developer > Export and name the file.
The costs: past 65,536 rows, Excel's XML export doesn't stop at 65,536. Microsoft documents that it writes the row count mod 65,537, so a 70,000-row table exports 4,463 rows, with no error to tell you. A longer sheet has to go out in pieces. Element names come from the map, not your headings, and the map belongs to that one workbook: data arriving in a new file has to be pasted into the mapped one or mapped again.
Limits
- .xlsx and .xlsm only. Legacy .xls, .xlsb and .ods files aren't accepted: open them in Excel and save as .xlsx first. A file with a password to open is detected, and has to be saved without the password first.
- One sheet per file. For several sheets, pick each in turn and download each.
- A fixed, flat shape. A root element, one element per row, one child per column. No attributes, no nesting, no namespaces, no XSD, and it won't fill in a schema someone else defined.
- Values only. Fonts, colours, formulas, charts, notes and images aren't included, and neither are number formats in Raw mode. A merged range keeps its value in its first cell. A web link keeps its text, not its address. When the sheet has notes, images, merged ranges or links, the page says how many.
- Leading and trailing spaces. A value like " North" is written as it is, but many XML readers trim it, the site's XML to Excel converter included. The page counts these values.
- Characters XML can't hold are removed. Control characters other than tab and line breaks (common in text pasted from old systems) make every XML parser refuse the file, so the converter drops them and counts them.
&, < and > are escaped, and a carriage return inside a cell is written as .
- Only the data block. Empty rows and columns around your table are dropped. Blank rows inside it are left out, since a blank row isn't a record. A column with a heading but no values stays, as empty elements.
A file from this converter, up to XML to Excel's 50MB limit, goes back into a workbook through XML to Excel with the same columns in the same order and the same rows, and a ZIP code like 02134 stays text. The headings come back as their element names, so Unit price ($) returns as Unit_price. If the receiving system takes JSON instead, Excel to JSON writes one object per row from an .xlsx.
Questions
How do I convert an Excel file to XML?
Drop the .xlsx or .xlsm file on this page, pick the sheet, and click Download .xml or Copy XML. Each row becomes a record element and each column a child element named from its heading. Inside Excel, the route is an XML Map on the Developer tab followed by Developer > Export, which works only in Excel for Windows.
Can you export Excel to XML without an XML Map?
Not as record XML from inside Excel: both Developer > Export and File > Save As > XML Data need a map. Save As XML Spreadsheet 2003 needs none, but it writes the whole workbook in Microsoft's own spreadsheet schema rather than your records. This converter writes the records with no map or schema.
Why does Excel say the XML maps in this workbook are not exportable?
The map holds a structure Excel can read but can't write back, most often a list of lists: a repeating element inside another repeating element, such as order lines inside orders. It happens a lot after opening an XML file and letting Excel infer the schema. Microsoft treats it as a limitation of Excel, so the fix is a flatter map or a different export route.
How do I export Excel to XML on a Mac?
Use a converter that runs in the browser, such as this one, because Excel for Mac has no XML Source pane and no Export command. The converter works the same on a Mac as on Windows. It reads the workbook on your computer, so nothing is uploaded.
What is the difference between XML Data and XML Spreadsheet 2003?
XML Data writes your records in the element structure of an XML Map you have added. XML Spreadsheet 2003 writes the workbook itself in Microsoft's SpreadsheetML schema, with Workbook, Worksheet, Row, Cell and Data elements. A system that asked for your product list as XML almost always wants the first.
Isn't an .xlsx file already XML?
Only inside the package. An .xlsx is a ZIP archive of XML parts, and the sheet's XML stores most text as numbers pointing into a separate shared strings part. Renaming the file to .zip shows you the parts, but none of them is a readable list of your records.
Is my spreadsheet uploaded when I convert it to XML?
No. The workbook is read and the XML is built in your browser, and your workbook isn't changed. The converter is free with no usage limit and no sign-up, for files up to 50MB.