Skip to main content
← All guides

11 min read

XML to Excel converter: which tool to choose to read, edit and get back to XML?

By Quentin Delepierre, Salesforce Commerce Cloud consultant

To go from XML to Excel, no single tool fits everyone. The right choice depends on what you do next: read, edit and send back an XML file, once or often, on a sensitive file or not. Here is what Excel's XML mapping does, six families of tools compared criterion by criterion, desktop XML editors, and the cases where ExcelifyXML is not the right choice.

Got your own XML? Drop it in and see it as a table, free and with no account. For an Excel file you can edit and then rebuild into an XML that keeps its structure, a free account is all you need.

Transform a file

Simple Excel table, free with no account, for files up to 1 MB. File that rebuilds into XML: free account, 3 free credits, no credit card.

Download an example result (.xlsx)Example source XML

Is there a tool that converts XML to Excel and rebuilds the original XML?

Yes, in several ways, each with its limits. Excel for Windows does it with XML maps, on simple XML files: the export refuses “lists of lists” and saves at most 65,536 rows, according to Microsoft. Desktop XML editors (Oxygen XML Editor, Altova XMLSpy, Liquid Studio) show the XML in a grid and edit it directly, and a script can go there and back if someone writes and maintains it. ExcelifyXML turns the XML into an Excel file or a CSV, which opens in Excel, LibreOffice, Google Sheets or Numbers, then rebuilds the XML with its root, attributes, namespaces and nesting.

The short answer: it depends on what you want to do next

  • Just read a small XML file, once: Excel is enough (File › Open). No need to install or upload anything.
  • Edit the values, then send back an XML that keeps its structure: you need a tool that can rebuild the XML. Excel alone can't once the file contains nested lists.
  • Do the same operation every day or every night: a script suits better than a tool where you drop a file by hand.
  • A file that must not leave your computer: a local tool (Excel, LibreOffice, a script).
  • Create an XML file from a table, with no sample XML: that is a different need, which neither Excel alone nor ExcelifyXML covers without a template.

Doesn't Excel's XML mapping already do this?

Partly, and only in Excel for Windows. With XML maps (Developer tab), Excel links XML to tables through a map, then exports the data back to XML. On a simple, flat XML file, with an XSD schema or the original XML to create the map, that can be enough.

If your XML is flat and you work on Windows, try XML maps first. Their limits, according to Microsoft:

  • Microsoft states that only Excel for Windows offers XML mapping, which isn't in Excel for Mac or Excel for the web. Microsoft also lists it as a legacy feature and recommends Power Query.
  • You need an XSD schema or an original XML: a table alone isn't enough.
  • A map can exist and the export still fail: nested lists (a “list of lists”, such as products that each have several descriptions per language), “denormalized” data or “choice” constructs. Catalogs and product feeds almost always contain them.
  • The export saves 65,536 rows at most and doesn't keep the file's comments.
  • Power Query reads XML but doesn't write it.

The six families of tools

  • Excel alone: opening an XML file directly, Power Query (Data › Get Data) and XML maps (Developer tab).
  • Google Sheets and LibreOffice: other spreadsheets, with their own XML functions.
  • Generic online XML to Excel or CSV converters: you drop a file, you get a table.
  • Scripts: Python (for example the read_xml function of pandas) or XSLT, a stylesheet that transforms XML.
  • Excel add-ins: extensions installed in Excel, of very varied nature.
  • ExcelifyXML: the XML becomes a table (Excel file or CSV) that you edit, then the original XML is rebuilt.

What do desktop XML editors such as Oxygen XML Editor, Altova XMLSpy or Liquid Studio offer?

They are programs you install on your computer, built for writing and developing XML. They work on the XML itself: validation against a schema (XSD), XSLT transformations, XPath queries, changes to the structure (for example adding an element or an attribute to every row of a table). ExcelifyXML doesn't do these operations: it needs no schema, keeps the structure of the original XML and is for editing its values in a spreadsheet.

They also have a grid view. Oxygen XML Editor shows the XML as nested tables, where the child elements and attributes of repeated elements become columns; XMLSpy and Liquid Studio likewise show repeated elements as a table, one row per element. They also exchange data with Excel: Oxygen XML Editor imports an Excel file into XML, XMLSpy accepts content pasted from Excel into its grid and exports XML data to text files, and Liquid Studio presents its table view as a way to import and export data from Excel.

What they need: an installation on your computer and a licence. Oxygen XML Editor is available for Windows, macOS and Linux; it is paid (perpetual licence or subscription), with a free 30-day trial. Altova XMLSpy is available for Windows (Altova states that it runs on macOS with Parallels); it is paid, with a free 30-day trial. Liquid Studio is available for Windows; it comes as a free Community Edition and as paid editions.

They are the right choice for developers and teams who write, validate or transform XML, or who maintain schemas and XSLT stylesheets. The need ExcelifyXML covers is different: giving a table (Excel file or CSV) to someone who works in a spreadsheet, with no XML software to install, then rebuilding the original XML from the edited table.

Criterion 1: reading an XML file as a table

  • Excel alone: File › Open on the XML file offers “As an XML table”, “As a read-only workbook” or the XML Source pane. Power Query also reads XML (Data › Get Data › From File › From XML), in the Excel versions that have it.
  • Google Sheets and LibreOffice: Sheets has the IMPORTXML function, which reads a web address (URL) with an XPath query, not a dropped file. LibreOffice Calc has Data › XML Source, which links the elements of an XML file to cells.
  • Online converters: it is their basic function. The quality of the table varies from one tool to another: try a sample.
  • Scripts: possible, with a little code. pandas.read_xml, for example, reads an XML file into a table with an XPath query; its documentation describes it as a convenience for flatter structures.
  • Add-ins: depends on the add-in. Check what it does with repeated elements before adopting it.
  • ExcelifyXML: the free preview detects the element that makes a row, announces the number of rows and columns and shows the first rows; you can pick another row tag.

Criterion 2: nested XML and repeated elements

This is where tools differ a lot. A product with several images, several prices or one description per language doesn't fit in one flat row.

  • Excel alone: Power Query reads nested XML, but it arrives as “Table” or “Record” columns that you expand one by one. With XML maps, the export stops on “lists of lists”.
  • Google Sheets and LibreOffice: you decide, query by query (XPath) or link by link (XML Source), what goes into which cells.
  • Online converters: most flatten in a fixed way that you don't choose. Check on a sample that nothing is missing.
  • Scripts: you keep control of how to flatten, including with an XSLT stylesheet. pandas.read_xml accepts an XSLT 1.0 stylesheet to flatten a complicated file before reading it.
  • Add-ins: to check, case by case.
  • ExcelifyXML: lists become numbered columns (description[fr], image[0], image[1]) or, as an option, a cell with one value per line for a simple repeated element. Limit: text mixed with tags doesn't fit in a cell (only the tags and their text are kept).

Criterion 3: getting back to an XML file that keeps its structure

Reading an XML file and writing it back are two different functions. Many tools only do the first.

  • Excel alone: XML maps exist only in Excel for Windows (not Excel for Mac, nor Excel for the web), the export refuses “lists of lists” and saves at most 65,536 rows, according to Microsoft. Power Query reads XML but doesn't write it. The “XML Spreadsheet” format describes the workbook, not your structure.
  • Google Sheets and LibreOffice: as far as we know, their XML functions are for reading. Check the documentation of your version before counting on them to send back an XML file.
  • Online converters: many only go one way, to a CSV or an Excel file. Check whether they can rebuild the original XML.
  • Scripts: yes, but you must write and maintain the code, for each file format.
  • Add-ins: some write XML. Check that they keep the root, the attributes, the namespaces and the nesting.
  • ExcelifyXML: the rebuild keeps the root, its attributes and namespaces, the nesting, the prefixes and the attributes. The rebuilt XML holds the same data in the same structure, without always being identical to the byte (XML declaration, formatting, empty tags with no attribute).

Criterion 4: leading zeros and long codes

A spreadsheet rewrites what it thinks it recognizes: “00123” becomes 123, an EAN code becomes 3.61235E+12, “1-2” becomes a date. This happens mostly when you open a CSV by double-click.

  • Excel alone: import the CSV as text (Data › From Text/CSV) for the code and date columns.
  • Google Sheets and LibreOffice: check the code columns after opening; most spreadsheets interpret a CSV.
  • Online converters and add-ins: look at whether the output is text or CSV to be interpreted.
  • Scripts: you choose the type of each column.
  • ExcelifyXML: in the Excel file (.xlsx), every value is text and every column has the Text format. On rebuild, zeros removed from a column of codes of the same length are put back; when doubt remains (codes of different lengths, EAN in scientific notation), the rebuild stops rather than produce a wrong XML.

Criterion 5: offline, and sensitive files

  • Excel alone, LibreOffice, scripts: everything happens on your computer, and works offline.
  • Google Sheets: it is an online service; your data goes through your Google account.
  • Online converters: the file is sent to the service. Look at what it does with it (retention, server country) before dropping a client file.
  • Add-ins: they run inside Excel, but some send data to a service. Read their description.
  • ExcelifyXML: the file is sent to our servers, in the European Union, processed in memory, then deleted. Above 4 MB it goes through a private, encrypted transit space, erased at the latest one hour after upload. No file and no metadata is kept. It is not a local tool.

Criteria 6, 7 and 8: cost, skills, file size

  • Excel alone: you need an Excel licence. Opening an XML file takes no skill; Power Query takes some notions, XML maps take a schema (XSD). Size: an Excel sheet holds at most 1,048,576 rows and 16,384 columns, and 32,767 characters per cell (Microsoft).
  • Google Sheets and LibreOffice: Sheets is free with a Google account, LibreOffice is free software. Same skills as for Excel. Row and column limits are specific to each spreadsheet.
  • Online converters: often free up to a certain size, sometimes paid beyond. No skills needed. The maximum size varies: it is stated on the site.
  • Scripts: free, but development and maintenance time counts. You need to program or write XSLT. A script can read a large file as a stream (pandas offers the iterparse option).
  • Add-ins: sometimes free, sometimes paid. Skills and limits vary a lot.
  • ExcelifyXML: the preview is free and needs no account, and so is the full Excel table of an XML file of 1 MB or less (2 per day). The transformation that lets you rebuild needs an account: free (files up to 4 MB, 3 credits at sign-up then 1 per week) or Pro (files up to 30 MB, 20 transformations per month). No technical skills.

When is ExcelifyXML not the right choice?

  • You only want to read a small flat XML file, once: Excel (File › Open) is enough. The free Excel table of the preview page works too, but it sends the file to our servers.
  • You need an automatic, recurring process (every night, at every export): ExcelifyXML is used by hand, by dropping a file. A script suits better.
  • You want to create an XML file from a table, with no sample XML: ExcelifyXML doesn't do that. It rebuilds an XML from a table that came from an existing XML, or from a template XML.
  • The file must not leave your computer: ExcelifyXML sends the file to its servers. Choose a local tool, or the standalone Excel workbook described below.
  • Your file is over the limit of your plan (4 MB free, 30 MB Pro): “Prepare your file” can slim it down, otherwise a script or an Enterprise quote.
  • You have used up your credits: the preview stays free, but the transformation takes a credit, and the rebuild a free account.
  • You need to validate the XML against a schema, transform it with XSLT or change its structure: a desktop XML editor (Oxygen XML Editor, Altova XMLSpy, Liquid Studio) is built for that.

When is ExcelifyXML the right choice?

  • You want to edit an existing XML file in a spreadsheet (prices, texts, translations, stock) then send it back to the platform that produced it.
  • The XML contains nested lists, attributes or namespaces, and it must get its original structure back: root, attributes, namespaces, nesting.
  • You want to know what the file will give before spending any credit: the preview is free.
  • You want to spot what the spreadsheet damaged: zeros removed, EAN in scientific notation, a rewritten date, a renamed header, characters replaced by “?”. The rebuild stops and says so, rather than produce a wrong XML.

Variant: the standalone Excel workbook, on your computer

For a file that must stay on your computer, ExcelifyXML also offers an Excel workbook (.xlsm). It holds your data and a “Generate XML” button: your edits and the XML generation happen in Excel, on your computer, offline. It needs desktop Excel (Windows or Mac) and the macro of that workbook allowed. The workbook itself is produced by our servers from your file: that step sends the file.

Going further

Try it on your file: the preview is free and needs no account, nothing is charged without your confirmation:

Transform a file