Repair an Excel Workbook with Corrupted Queries or External Links
Question details
Recover an Excel workbook that opens with a repair message and loses queries, external links, or external data ranges.

- Product
- Microsoft Excel and SharePoint
- Device & OS
- not provided
- Scenario
- A workbook stored in SharePoint contains queries or connections to external data sources.
- Observed behavior
- Excel reports that it repaired the workbook and removed query information, external links, or external data ranges.
Download the workbook from SharePoint and identify the affected queries or external data sources, if possible. Use the Excel desktop app for Open and Repair, and review the recovery message for the items Excel removed.
Use Excel Open and Repair on the downloaded workbook
Use Excel's built-in repair feature to attempt to recover the workbook before rebuilding it.
In the SharePoint document library, select the workbook and choose Download.
In the Excel desktop app, select File > Open > Browse and locate the downloaded workbook.
Select the file, click the arrow next to Open, and choose Open and Repair. Select Repair when prompted.
Review the repair message, then open Data > Queries & Connections and check the workbook links to see what survived. Save the repaired workbook under a new name.
Repeat File > Open > Browse > Open and Repair, then choose Extract Data if Excel cannot repair the workbook. Check the extracted values and formulas.

Check SharePoint version history for an intact workbook
Try an earlier version if the current workbook has lost its queries or links.
Rebuild the workbook and recreate its data connections
Use a new workbook when repair fails or removes essential query and link information.
Work with Excel Files in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface for opening and editing Excel files. Its format compatibility makes it easy to move everyday workbook tasks to WPS, although it does not repair Excel-specific queries or connections.

Frequently Asked Questions
Where is Open and Repair in Excel?
In the Excel desktop app, select File > Open > Browse, select the workbook, and click the arrow next to Open. Choose Open and Repair, then select Repair.
Can Excel restore queries that were removed during repair?
Not always. Check Data > Queries & Connections after repair. If a query is missing, use Data > Get Data to reconnect to the source and recreate it.
How can I find an earlier SharePoint version?
In the SharePoint document library, open the workbook's More options menu and select Version history. Open or download an earlier version and check whether its queries and links work before restoring it.
Why does the problem affect only one workbook?
The affected workbook's query structure, connection, or external data source may be involved. Compare its connections under Data > Queries & Connections with those in workbooks that open normally.
What should I do if earlier versions also lose their queries?
Create a blank workbook, copy unaffected cell ranges into it, and use Data > Get Data to rebuild the required queries. Test the connections with Data > Refresh All.




