File Corruption & Recovery

Fix the "Removed Records Object XML" Error in Excel

Chanuka GeekiyanageChanuka Geekiyanage Oct 19, 2026 868 views

Question details

The user needs to fix an error message regarding removed XML objects that appears when opening a specific Excel workbook.

How to Fix the "Removed Records: Object from /xl/worksheets/sheet1.xml" Excel Error
Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening a previously saved Excel workbook that contains corrupted worksheet sorting parameters.
Observed behavior
Excel displays an error stating 'Removed Records: Object from /xl/worksheets/sheet1.xml part' and strips out the corrupted sort data to open the file.
Before you start

Create a backup copy of your corrupted Excel workbook before attempting to run any Visual Basic macros to clear the sort fields.

Solution 1Recommended

Clear Corrupted Worksheet Sort Fields via VBA

Clearing the corrupted sorting data on the affected worksheet using the Visual Basic Editor prevents the XML error from triggering upon opening the file.

This error is typically caused by invalid or corrupted sorting data applied to a specific worksheet (often Sheet1 or Sheet5). By using a simple macro command to clear the sort fields before saving, the broken XML record is removed cleanly.

1
Open the VBA Editor

Open the affected Excel workbook and press the 'ALT + F11' keys on your keyboard to launch the Visual Basic for Applications (VBA) Editor.

2
Open the Immediate Window

In the VBA Editor, press 'CTRL + G' to open the Immediate Window, which typically appears at the bottom of the screen.

3
Run the Clear Sort Command

Click inside the Immediate Window, type the command: Sheets("Sheet1").Sort.SortFields.Clear (replace "Sheet1" with the name of the corrupted sheet), and press Enter.

4
Save and Reopen

Close the VBA Editor, save your Excel workbook, close the application completely, and then reopen the file to verify the error is resolved.

Clear Corrupted Worksheet Sort Fields via VBA
Verify the Sheet Name: Check the original error message to identify the exact sheet causing the issue (e.g., sheet5.xml implies Sheet 5). Ensure you replace 'Sheet1' in the VBA code with the correct sheet name.
Free Microsoft Office alternative

Try WPS Office for Reliable Spreadsheet Management

If you frequently encounter corrupted XML errors or file recovery issues in Microsoft Excel, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for viewing, editing, and managing your spreadsheets without heavy processing errors.

  1. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite.
  2. 2. Open the Corrupted File: Launch WPS Spreadsheet and open the Excel file that was throwing the XML error.
  3. 3. Save as New File: Go to Menu > Save As and save the file as a new .xlsx document to generate a fresh, uncorrupted XML file structure.
Highly compatible with Microsoft Excel formats (.xlsx, .xls, .csv)Lightweight and fast, reducing the risk of file corruption crashesFamiliar user interface makes switching seamless and easyBuilt-in document recovery tools to safeguard your spreadsheet data
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel say "Removed Records: Object from /xl/worksheets/"?

This error occurs when the underlying XML code of the Excel file becomes corrupted. It is most commonly triggered by invalid, overly complex, or broken sorting rules applied to a specific worksheet. Excel removes these broken XML records automatically to force the file to open safely.

Will I lose my data when Excel removes these XML records?

Generally, no. Excel only removes the specific corrupted feature, such as a custom sort or filter applied to the affected sheet. Your core cell data, text, and formulas usually remain entirely intact.

How do I know which worksheet is causing the XML error?

The error message specifies the problematic sheet within its file path. For example, a message pointing to "/xl/worksheets/sheet1.xml" indicates that the worksheet named "Sheet1" contains the corrupted sorting data.

Can I prevent this XML corruption from happening again?

To prevent sorting-related XML errors, avoid applying overly complex multi-level sorts on massive datasets simultaneously, avoid saving files during system lag, and ensure your spreadsheet software is regularly updated to the latest version.