araç köşesi

XML to Excel (XLSX)

Turn XML records into an XLSX workbook that Excel opens directly, UBL invoice lines included

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

Say your shop system exports orders as XML and you want them in Excel to sort and total. Open the .xml file in Notepad (right-click → Open with → Notepad) or TextEdit, select everything, copy it and paste it into the left pane. The tool treats the repeating tag as the row: in the sample, each <order> is one row, and <customer>, <zip>, <total> and <shipped> become columns, while attributes such as id and currency get their own @id and @currency columns. The result line names the tag it used; if it picked the wrong one, type the right tag into the box. Download gives you a real .xlsx workbook. By default every value is stored as text, so the Boston ZIP code 02134 keeps its leading zero and a long order number is not rounded. Choose "Make dot decimals numbers" and totals like 249.90 become numbers you can sum; ZIP codes still stay text. The right pane shows the same table as tab-separated text, which you can also copy and paste straight into an open sheet.

This tool is also known as xml to excel, xml to xlsx, xml to excel converter, convert xml to excel, open xml in excel, ubl invoice to excel.

What is XLSX?

XLSX is the workbook format Excel has used since 2007: a zipped package of XML files, one per sheet. Unlike CSV, it records the type of every cell (text or number) and settings such as column width, so 02134 is stored as text and the columns never shift, whatever region settings the computer uses. Google Sheets, LibreOffice and Numbers open it too.

What is UBL invoice?

UBL (Universal Business Language) is the XML standard behind most electronic invoices exchanged over Peppol. The data sits in named tags: invoice number in cbc:ID, issue date in cbc:IssueDate, each line in cac:InvoiceLine, the line amount in cbc:LineExtensionAmount. The cbc: and cac: prefixes mark namespaces; this tool keeps them in the column names so you can tell fields apart.

What is the difference between XML and Excel (XLSX)?

XML describes data as nested tags and is built for programs to read; one record may have three sub-fields and the next one five. Excel puts everything into rows and columns so people can filter, sort and total. Converting XML to XLSX flattens the tree: nested data gets a long column name like cac:Item.cbc:Name, and a missing field is an empty cell. Use XLSX to review and calculate, and keep the XML when the data has to go back into a system.

When a value becomes a number and when it stays text

XML has no number type: in <total>249.90</total> the value is just text. Excel cares a lot about the difference. A number cell can be summed, but Excel drops leading zeros and keeps only 15 significant digits, so ZIP codes, phone numbers and long IDs get damaged. That is why the default keeps everything as text.

With "Make dot decimals numbers", only XML's own number notation is converted: values like 249.90, 1285 or -15.5, with a dot as the decimal mark and no thousands separator. UBL invoice amounts use exactly this notation, so line totals become summable. Values with a leading zero, more than 15 digits, or a comma (1,285.00 is ambiguous across regions) stay text. The result line tells you how many cells were written as numbers.

Tips for UBL and Peppol invoices

Electronic invoices sent over the Peppol network (used in the UK public sector, Australia, New Zealand and much of Europe) are UBL XML. Line items sit in cac:InvoiceLine, notes in cbc:Note, attachments in cac:AdditionalDocumentReference. Type InvoiceLine into the row box to get one row per line item; the cac: prefix is optional.

Attachments are often embedded as long base64 text. Excel holds at most 32,767 characters in a cell, so such values are cut at that limit and counted in the result line. To combine several invoices, convert them one by one and paste the rows under each other in Excel (skip the header row).

Frequently asked questions

How do I open an XML file in Excel as a table?

Open the XML file in Notepad or TextEdit, copy everything and paste it into the left pane on this page. The repeating tag becomes the row and the tags inside it become columns. Click Download; the .xlsx file opens in Excel with a double-click, with no import wizard.

Why can't I sum the amounts in Excel?

By default values are written as text so IDs and ZIP codes stay intact. To sum amounts, set "Values that look like numbers" to "Make dot decimals numbers" and download again; amounts written like 249.90 become numbers. The result line shows how many cells were converted.

Can I merge several XML files into one spreadsheet?

This tool takes one XML at a time. Convert the files one by one, open the first in Excel and paste the rows of the others below it, leaving out their header rows. Files from the same system produce the same columns in the same order.

Are my invoices sent to a server?

No. Reading the XML and building the Excel file both happen inside your browser; invoice data, tax IDs and amounts never leave this page and are not stored. Once the page has loaded, the conversion works even offline.