Skip to content

XML to Excel XLSX converter

XML to XLSX makes hierarchical XML reviewable in Excel by flattening detected row elements into one worksheet.

  • Converted with Table engine · nothing stored
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Worksheet output Changed

    The API produced a 16,473-byte XLSX with one sheet named xml from the detected product rows.

  • Header row Changed

    The workbook header row contained flattened column names such as price.#text, price.@_currency, @_id, and @_active.

  • Attributes Changed

    XML attributes were written as ordinary worksheet columns instead of Excel comments or metadata.

  • Nested price element Changed

    The price text and its currency attribute became separate cells, preserving both data values but not the original element wrapper.

  • Repeated tags Changed

    The Hoodie row contained the string ["outerwear","fall"] in one cell for two tag children.

  • Types Changed

    Sheet inspection showed values as display strings such as 49.95 and true, so validate types before formulas or pivots.

  • XML document context Lost

    The catalog wrapper, declaration, formatting, comments, and exact hierarchy were not preserved in the Excel workbook.

Sample conversions

Catalog to worksheet

Input
359-byte catalog XML with two products, product attributes, nested price values, and repeated tags.
Output
16,473-byte XLSX inspected as ["name","price.#text","price.@_currency","tag","@_id","@_active"] followed by ["Hoodie","49.95","USD","[\"outerwear\",\"fall\"]","p-100","true"].

Single tag product

Input
Product p-200 had name Mug, price 12.5 USD, one tag ceramic, and active false.
Output
The workbook row inspected as Mug, 12.5, USD, ceramic, p-200, false across the flattened columns.

A real XML → Excel XLSX run

We converted our XML sample (733 B) with Table engine on 2026-10-20. It took 2 ms and produced a 17 KB Excel XLSX file, 23× larger than the input. The engine raised 1 warning, listed below.

Input · sample.xml · 733 B

25 elements, root <rows>, XML declaration present

Elements
25
Root element
rows
XML declaration
yes

Output · sample.xlsx · 17 KB

Workbook with 1 sheet (xml); first sheet 5 rows, 25 cells, 0 formulas, header filter, fitted column widths

Sheets
1
Sheet names
xml
Rows
5
Cells
25
Formulas
0
Header filter
yes
Column widths
fitted
  • XML rows were detected with a heuristic; pass rowPath for deterministic parsing.

Options and when to change them

rowPath
Set a deterministic repeated-element path before creating a workbook from large or deeply nested XML.
flattenSeparator
Change the separator if periods in Excel headers conflict with your downstream naming rules.
arrayMode
Explode repeated children only when each record has a predictable small number of child nodes.

Do it yourself

Python pandas

bash
python - <<'PY'
import pandas as pd
rows = pd.read_xml("in.xml", xpath=".//product")
rows.to_excel("out.xlsx", index=False, sheet_name="xml")
PY

pandas read_xml may not flatten attributes and nested repeats the same way; inspect the columns before sharing the workbook.

XML to Excel XLSX by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Table engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=xml&to=xlsx.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.xml" -F "from=xml" -F "to=xlsx" \
  -F 'options={"encoding":"utf-8"}' \
  --output output.xlsx

Options this engine accepts for XML → Excel XLSX

KeyApplies toTypeDefault
encodingReading XMLutf-8 · latin1utf-8
flattenSeparatorReading XMLstring.
arrayModeReading XMLjson · explodejson
rowPathReading XMLstring
sheetNameWriting Excel XLSXstring
API reference

When this is the wrong conversion

  • Use /convert/xml-to-csv when the recipient needs a lightweight import file rather than an Excel workbook.
  • Keep XML when schema validation, namespaces, mixed content, or exact element order must remain intact.

XML to Excel XLSX questions

Does XML to XLSX keep attributes?

Yes, but as flattened columns. In the verified workbook, product id and active attributes appeared as @_id and @_active cells.

Why did repeated XML tags become one cell?

The default array mode keeps variable repeated children together as JSON text. That avoids creating inconsistent extra columns when rows have different repeat counts.

Can I control which XML nodes become rows?

Without it, the parser guesses and reports a heuristic row-detection warning. The conversion counts toward your daily or monthly allowance like every other, and the input is deleted within 24 hours.