7 min read
Open and edit an XML file in Excel (without coding)
By Quentin Delepierre, Salesforce Commerce Cloud consultant
Excel can "open" an XML, but the result is often unreadable or breaks the file's structure. Here's a reliable way to edit any XML in a spreadsheet and get it back intact.
Why Excel's native open is a problem
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.
The reliable method
- 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.
- Confirm (1 credit) and get a clean CSV, where the XML hierarchy is flattened into readable columns.
- Open it in Excel, Numbers or Google Sheets and edit whatever you need.
- Drop the edited CSV with its skeleton.json on the Rebuild page: 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 element is numbered: color[0], color[1].
- 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[0] , color[1] , 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 file, headers starting with @ are preceded by an apostrophe, a protection against formulas: leave it, it's removed on reconstruction.
Common mistakes
- 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: import those columns as Text.
- "?" replaces some characters: save 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").
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 (auto-detected)
- On the way back, the CSV saved by Excel, Numbers, Google Sheets or LibreOffice: separator and encoding recognized automatically (CSV UTF-8, Windows or Mac "CSV", MS-DOS…)
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
No file is kept: processed in memory on European servers then deleted immediately. DOCTYPE/ENTITY declarations are blocked (XXE attack prevention), and CSV formula injection is neutralized.
Open your XML file in Excel now:
Transform a file