8 min read
Open an XML file: 4 ways, then edit it in Excel (no coding)
By Quentin Delepierre, Salesforce Commerce Cloud consultant
An XML file is plain text: several tools can open it, and the right one depends on what you want to do. Read it, fix a value, or work on it as a table in Excel (where the native open is often unreadable or breaks the structure): here are the four ways, then a reliable method to edit any XML in a spreadsheet and get it back intact.
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.
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.
How do you open an XML file, and how do you edit it in Excel?
An XML file is plain text: a double-click most often opens it in a browser, and a code editor lets you fix a value. Excel can also open it, to show the data as a table, but the native open is often unreadable for even a slightly complex XML file and doesn't let you regenerate the original file. With ExcelifyXML, you turn the XML into an Excel file (.xlsx), edit it, then rebuild it into XML with its original structure. The preview is free and needs no account; to edit the file and then regenerate the XML, you need a free account and 1 credit.
- To read it: double-click. The file most often opens in a browser, which shows its content.
- To see the raw text or fix a value: right-click › Open with, then Notepad (Windows), TextEdit (Mac) or Visual Studio Code.
- To turn it into a table: Excel (File › Open), or ExcelifyXML's free preview, which shows the table before any credit is used. Details below.
How to open an XML file: what are the 4 ways?
An .xml file is a text file: a double-click often opens it in your browser or in the editor of your choice. Four ways to open it, depending on what you need:
- A browser: drag the file into a browser window. Without a style sheet, it shows the content of the XML, as a tree or as text depending on the browser. For a quick look, read-only.
- Notepad (Windows) or TextEdit (Mac): the file opens as text. For reading a small file or fixing one value; a large file can be slow to open, and check the encoding when you save.
- A code editor such as Visual Studio Code: tag colouring, search, and document formatting with an XML formatting extension. The most comfortable way to read and fix an XML file of a few thousand lines.
- Excel: the right choice when you want to see the data as a table, one row per product or per URL, to sort, filter and fix in bulk. Excel can open an XML file, but not always cleanly: that's what the rest of this guide is about.
Why does opening an XML file natively in Excel cause problems?
When you open an XML directly in Excel, it tries to guess the structure and often offers a confusing schema mapping. For even slightly complex XML (nested elements, attributes, repetitions), the result is unusable and, crucially, you won't be able to regenerate the original file.
The real need isn't just opening the XML: it's editing it AND rebuilding it with its original structure so you can reuse it.
How do I turn an XML file into Excel, edit it, and put it back into XML?
- Drop your XML file on ExcelifyXML: a free preview shows the detected row tag and the first rows. Not the right row? Pick another one, still without using a credit. Without an account, you can already see the preview and, for a file of 1 MB or less, download a simple Excel table for free (without the structure: it can't be rebuilt into XML).
- Confirm (1 credit) and choose the Excel file (.xlsx), where the XML hierarchy is flattened into readable columns — or the CSV, for a script or another tool.
- Open the Excel file in Excel, LibreOffice, Google Sheets or Numbers, edit whatever you need and save it.
- Drop the saved Excel file, alone, on the Rebuild page (or the edited data.csv with its skeleton.json): the algorithm restores the exact structure, attributes and order.
How the XML becomes columns
The repeated tag (here <product>) becomes one row per occurrence. Everything inside it becomes a column, following a few simple rules:
- A simple element keeps its name: name.
- An attribute starts with @: @id for the row's attribute, price.@currency for an element's attribute.
- A repeated simple element fits in one cell, one value per line: color. Uncheck “Group repeated values” when uploading to number it instead: color[0], color[1] (a repeated element with attributes or sub-tags is always numbered).
- An element repeated per language takes the language in brackets: description[fr], description[en].
- The own text of a row that also has attributes goes into the #text column.
<catalog>
<product id="P001">
<name>Light jacket</name>
<price currency="EUR">89.00</price>
<color>blue</color>
<color>black</color>
<description xml:lang="fr">Veste coupe-vent</description>
<description xml:lang="en">Windproof jacket</description>
</product>
…
</catalog>@id , name , price.@currency , price , color , description[fr] , description[en]
P001 , Light jacket , EUR , 89.00 , "blue
black" , Veste coupe-vent , Windproof jacket
P002 , Crew-neck sweater , EUR , 59.00 , "grey
green" , Pull en laine , Wool sweaterWhat you can do in the spreadsheet
- Change any value, sort, filter, use formulas (then paste the result as values).
- Add a row: it becomes a new element. Delete a row: the element disappears from the XML.
- Add a column: it becomes a new tag in every row that has a value. An empty cell writes nothing.
- Don't rename headers: each column's name tells where its value goes back in the XML. In the CSV, headers starting with @ are preceded by an apostrophe, a protection against formulas: leave it, it's removed on reconstruction.
What are the common mistakes when editing an XML file in Excel, and how do I fix them?
- The CSV opens in a single column: your Excel expects another separator. Open it with Data › From Text/CSV, or see the dedicated guide.
- Codes turn into 3.61235E+12 or lose their zeros: take the Excel file (.xlsx), where everything is written as text, or import those CSV columns as Text.
- "?" replaces some characters: take the Excel file, which keeps every character, or save the CSV as "CSV UTF-8".
- The rebuilt XML doesn't have your edits: you dropped the .excelify.zip back as downloaded. The spreadsheet saves the CSV next to the archive, not inside it: drop the edited data.csv with its skeleton.json ("Separate files"). With the Excel file, save it, then drop that file.
- You use Numbers: when it saves, it removes the hidden sheet that holds the structure. Drop the Excel file with its skeleton.json (link on the result screen, or in the .excelify.zip), in "Separate files".
- Small green triangles show on the cells you type in the Excel file: Excel flags a number stored as text, it's intended. Never click "Convert to Number".
Which XML files are supported?
- E-commerce feeds (Google Shopping, PrestaShop, WooCommerce, Magento)
- PIM exports (Akeneo, Salesforce Commerce Cloud)
- RSS files, sitemaps, various business exports
- UTF-8, UTF-16, ISO-8859-1, Windows-1252 encodings, and declared Central European, Greek, Turkish, Cyrillic, Japanese, Chinese or Korean ones (auto-detected)
- On the way back, the saved Excel file (.xlsx), or the CSV saved by Excel, Numbers, Google Sheets or LibreOffice: separator recognized automatically, encoding most of the time (CSV UTF-8, Windows or Mac "CSV", MS-DOS…); "CSV UTF-8" is the safest
Variant: regenerate the XML from Excel
Rather not come back to the site after your edits? The standalone Excel workbook (2 credits) holds your data and a "Generate XML" button: your edits and the XML generation happen in Excel, on your computer, offline, as many times as needed. It needs desktop Excel, on Windows or Mac.
Security and privacy
The file is processed in memory on European Union servers, then deleted immediately; above 4 MB, it goes through a private, encrypted transit space for the time of the preview and the transformation, then it's wiped (at the latest one hour after the upload). Entity declarations (ENTITY, alone or inside a DOCTYPE) are blocked (XXE attack prevention), the external DTD a DOCTYPE names is never downloaded, and CSV formula injection is neutralized.
Open your XML file in Excel now:
Transform a file