How to recover a “Corrupt” Excel file using the XML extraction method.

When an Excel workbook will not open and displays messages like “We found a problem with some content” or “Excel cannot open the file because the file format or extension is not valid,” automated recovery tools often fail. Because modern .xlsx and .xlsm workbooks are actually standard zip containers of interconnected XML files, you can manually access the archive, repair or remove the damaged XML component, and recover your underlying tabular data.

Quick Answer

Make a copy of your broken file, change the file extension from .xlsx to .zip, and extract the archive into a folder. Open the xl subfolder to retrieve your raw data directly from sharedStrings.xml and individual worksheet files (like sheet1.xml), or delete corrupt components like calcChain.xml and recompress the folder.


Step 1: Create a Safe Workspace and Change Extension

Never attempt recovery on your original, production file. Always work on an isolated copy:

  1. Locate your corrupt file in Windows File Explorer.
  2. Press Ctrl + C and Ctrl + V to create a duplicate copy.
  3. Ensure file extensions are visible: In File Explorer, click View > Show > File name extensions.
  4. Right-click the duplicate file, click Rename, and change the extension from .xlsx (or .xlsm) to .zip.
  5. Press Enter. Windows will display a warning: “If you change a file name extension, the file might become unstable.” Click Yes.

Step 2: Extract the File Architecture

Modern Office files use the Open Packaging Conventions (OPC) standard. Changing the extension allows standard archiving software to unpack the internal file structure:

  1. Right-click the newly renamed .zip file and select Extract All….
  2. Choose a destination folder (e.g., Desktop\Excel_Extracted) and click Extract.
  3. Open the extracted folder. You will see the standard internal architecture of an Excel workbook:
    • [Content_Types].xml (Describes all parts inside the package)
    • _rels/ (Folder containing package relationship definitions)
    • xl/ (Folder containing the core spreadsheet contents)
    • docProps/ (Metadata, author details, creation dates)

If Windows reports that the zip archive is “Invalid” or “Corrupted” before extraction can begin, the file’s binary header is severed. In that case, attempt recovery from temp files first as outlined in Troubleshooting AutoRecover failures: Where to find unsaved temp files.


Step 3: Remove Known Corruption Culprits

Most non-opening errors are caused by corrupt calculation dependency chains, broken drawing layers, or corrupted custom cell style tables—not the actual row and column data.

  1. Open the extracted xl folder.
  2. Delete calcChain.xml: This file contains the precompiled dependency tree of your formulas. If a thread crashed during a save, this file often contains truncated, unclosed XML tags. Excel does not need this file to open; if missing, it simply recalculates all formulas from scratch on launch.
  3. Inspect the drawings/ folder: If present inside xl/, move this folder to your desktop. Corrupted vector shapes and broken image links are leading causes of unreadable content errors.
  4. Return to the root folder where you extracted the files, select all files and folders together, right-click, and choose Compress to ZIP file.
  5. Rename the new zip file’s extension back to .xlsx and attempt to open it in Excel.

If the file opens successfully, you can rebuild formula dependencies and formatting safely. If Excel still throws errors, see “We found a problem with some content in ‘filename.xlsx'”: Using the Open and Repair tool.


Step 4: Extract Raw Text from sharedStrings.xml and Worksheets

If the workbook structure is too badly damaged to reassemble as a functional spreadsheet, extract the raw table values manually to prevent total data loss.

In the Excel architecture:

  • xl/sharedStrings.xml contains every unique text string typed into the workbook.
  • xl/worksheets/sheet1.xml contains the cell coordinates and numeric values. Text cells in sheet1.xml refer to numerical index keys that point directly to entries in sharedStrings.xml.

Option A: Open Worksheets in a Text or Code Editor

  1. Navigate to xl/worksheets/.
  2. Right-click sheet1.xml and open it with Notepad, VS Code, or any clean text editor.
  3. Look for the <sheetData> XML block.
  4. Each cell is wrapped in a <c> element:
    • Numeric values appear inside value tags: <c r="A1"><v>1250</v></c>
    • Text references appear with an attribute t="s": <c r="B1" t="s"><v>0</v></c> (where 0 corresponds to the first string in sharedStrings.xml).
  5. If you only need to recover numeric tables, inventory values, or critical figures, copy the text between the <sheetData> tags.

Option B: Import Raw Worksheet XML Using Power Query

You do not need to manually parse XML text by hand. You can import the isolated worksheet XML file into a healthy Excel session:

  1. Open a blank, healthy Excel workbook.
  2. Go to Data > Get Data > From File > From XML.
  3. In the file browser, navigate to your extracted folder and select xl/worksheets/sheet1.xml.
  4. Click Import.
  5. Power Query will parse the raw XML schema and present a structured table displaying row numbers, column references, and raw values.
  6. Click Load to output the recovered raw dataset into your clean workbook grid.

Step 5: Fixing Broken XML Tags with a Validation Parser

If you need to fix the workbook so it opens normally with its original formatting:

  1. Open xl/worksheets/sheet1.xml (or whichever sheet is failing) in a web browser like Microsoft Edge or Google Chrome.
  2. Web browsers have strict XML rendering engines. If the XML contains an unclosed tag or illegal character, the browser will refuse to display the page and print the exact error location:
    • Example: XML Parsing Error: mismatched tag. Line 1420, Column 45.
  3. Open the XML file in a code editor like Notepad++, navigate to the reported line and column, and inspect the issue.
  4. Common issues include truncated tags (e.g., <v>100 missing its closing </v>) or invalid non-printable control characters.
  5. Fix the tag, save the XML file, re-compress the package into a .zip archive, rename it back to .xlsx, and open the repaired file in Excel.