Office Apps Crashing

Fix Excel Crashes After Removing an XML Source from a Workbook

Bushra ParveenBushra Parveen Nov 12, 2026 869 views

Question details

The user needs to stop an Excel workbook from crashing after an XML map or XML data source was removed.

Fix Excel Crashes After Removing an XML Source from a Workbook
Product
Microsoft Excel
Device & OS
not provided
Scenario
An XML source, map, or imported XML data connection was deleted from a workbook.
Observed behavior
Excel becomes unstable or crashes because the workbook may still contain references to the removed XML source.
Before you start

Close the workbook and reopen it only after identifying the deleted XML map, query, or connection if possible. Use a separate working copy while checking workbook objects so you can test each cleanup change safely.

Solution 1Recommended

Remove connections and queries that reference the deleted XML source

Use this method when the workbook used XML imports, Power Query, or external data connections before the XML source was removed.

A deleted XML source can leave a connection or query that tries to refresh unavailable data when the workbook opens. Removing or updating these items can prevent Excel from crashing during loading or refresh.

1
Open the workbook without refreshing data

In Excel, open the workbook and choose not to refresh external data if you are prompted. If it crashes immediately, start Excel in Safe Mode by holding Ctrl while opening Excel, then open the file.

2
Review workbook connections

Go to Data > Queries & Connections. On the Connections tab, select connections associated with the removed XML file, XML URL, or old data source, then choose Remove or Properties to update the source.

3
Check Power Query items

Go to Data > Queries & Connections and select the Queries tab. Right-click any query that imports or transforms the deleted XML data, then choose Edit to change its source or Delete if it is no longer needed.

4
Check external workbook links

Go to Data > Edit Links, if available. Select links that point to the deleted XML-related source or unavailable workbook and choose Break Link or Change Source as appropriate.

Remove connections and queries that reference the deleted XML source
Refresh only after cleanup: After removing or correcting XML-related connections and queries, save the workbook, close Excel, and reopen the file before using Refresh All.
Free Microsoft Office alternative

Open and rebuild the affected workbook with WPS Office Spreadsheets

If Microsoft Excel continues to crash after an XML source is removed, WPS Office provides a free, lightweight spreadsheet alternative with a familiar interface. Open the workbook in WPS Spreadsheets, inspect usable sheets and formulas, then save a clean copy for continued work or migration.

  1. 1. Install WPS Office: Download and install WPS Office, then open WPS Spreadsheets from the WPS Office home screen.
  2. 2. Open the Excel workbook: Select Open and choose the affected .xlsx or .xls file. If the workbook opens, review the worksheets that contain usable data.
  3. 3. Create a clean workbook: Choose Menu > New to create a spreadsheet, then copy usable worksheet data into the new file as needed.
  4. 4. Save in Excel format: Choose Menu > Save As and select Excel Workbook (*.xlsx) to keep the rebuilt file compatible with Microsoft Excel.
Open and edit compatible .xlsx and .xls spreadsheet files.Use a familiar spreadsheet interface to review formulas, names, and worksheet data.Create a clean workbook by copying unaffected sheets from a problematic file.Lightweight installation supports a seamless transition from Microsoft Office workflows.
QA img-9

Frequently Asked Questions

Why does Excel crash after I delete an XML map?

Excel may still attempt to load a connection, Power Query query, defined name, formula, validation rule, or external link that refers to the removed XML source. Remove or update those references from Data > Queries & Connections, Formulas > Name Manager, and Data > Data Validation.

Where can I remove XML-related data connections in Excel?

Go to Data > Queries & Connections and open the Connections tab. Select a connection related to the deleted XML source and choose Remove, or open Properties to point it to a valid source.

How do I find broken named ranges after deleting XML data?

Go to Formulas > Name Manager. Look for names containing #REF! or names that reference the removed XML range, then select them and click Delete or edit the Refers to field.

Can Open and Repair fix an Excel workbook that crashes?

It can help when the workbook contains damaged structures. Go to File > Open > Browse, select the file, click the arrow beside Open, choose Open and Repair, and select Repair.

Will copying worksheets into a new workbook remove the XML problem?

Often, yes. Right-click an unaffected sheet tab, choose Move or Copy, select (new book), and enable Create a copy. This can leave behind damaged workbook-level XML connections and metadata.