Re-installing broken MS Query links in Excel 365 requires locating the underlying ODBC connection strings and refreshing them through the Data tab. When external data sources become unavailable, you must verify the driver installation and update the query properties to restore the link between your workbook and the database.
Identifying Broken Connections
When an MS Query connection fails, Excel typically displays error messages indicating that the data source cannot be found or that the connection string is invalid. This often happens after moving workbooks to different machines, updating Office versions, or changing network configurations. The first step is to identify which specific queries are affected. Open your workbook and navigate to the Data tab on the ribbon. Look for the Queries & Connections pane, which lists all active data connections. If a connection is broken, it will usually show a warning icon or display an error status next to the query name. You can also check individual worksheets for cells that return#REF! or #VALUE! errors when attempting to refresh data. These errors indicate that the formula or query referencing the external data source is no longer valid. In some cases, the entire table may fail to populate, leaving you with empty cells or static data from the last successful refresh. Understanding the scope of the breakage helps determine whether you need to reconfigure a single query or multiple connections across the workbook.
Locating the ODBC Driver
MS Query relies heavily on ODBC (Open Database Connectivity) drivers to communicate with databases. If the driver is missing or corrupted, the link will break regardless of the query settings. To verify if the correct driver is installed, open the Windows Control Panel and search for ODBC Data Sources. Depending on your system architecture, choose either the 32-bit or 64-bit version to match your Office installation. Most Excel 365 installations use the 32-bit ODBC manager even on 64-bit systems, so checking both may be necessary. In the ODBC Data Source Administrator, navigate to the Drivers tab to see a list of installed drivers. Look for the specific driver required by your database, such as SQL Server, Oracle, or Access. If the driver is not listed, you must download and install it from the vendor’s website before proceeding. Ensure that the driver version matches the expectations of your MS Query configuration. Mismatched architectures between Excel and the ODBC driver are a common cause of silent failures where the query appears to run but returns no data.Re-configuring the Connection String
Once you have confirmed the driver is present, the next step is to update the connection string within Excel. Right-click on the affected query in the Queries & Connections pane and select Properties. In the dialog box that opens, go to the Definition tab. Here you will find the connection string that tells Excel how to reach the database. If the path has changed due to server migrations or file moves, you must edit this string to reflect the new location. Click the Edit button next to the connection string field to launch the Microsoft Query interface. This tool allows you to visually rebuild the connection. Select the appropriate data source from the list, which should now appear because the driver is installed. Follow the prompts to authenticate and select the tables or views you wish to import. After verifying the data preview, save the changes. This process effectively re-links the query to the correct database endpoint.Refreshing and Verifying Data
After updating the connection properties, return to Excel and click the Refresh All button in the Data tab. Monitor the progress bar at the bottom of the screen to ensure the operation completes without errors. If the refresh succeeds, the data should populate correctly in your worksheet. It is advisable to test the query manually by opening Microsoft Query again and running the SQL statement to confirm connectivity. If issues persist, consider checking firewall settings or network permissions that might block the connection. Additionally, ensure that any macros or VBA scripts used to automate data retrieval are updated to use the new connection parameters. For more information on handling sharing violations during these updates, refer to our guide on resolving Excel Data Connection: 'Changes Could Not Be Saved' Sharing Violation Error. Regular maintenance of these links prevents unexpected disruptions in your reporting workflows.Frequently Asked Questions
Why does my MS Query show a "File Not Found" error?
This error usually indicates that the file path specified in the ODBC connection string is incorrect or inaccessible. Verify that the server name or file location matches the current network environment and that you have read permissions.
Can I fix broken links without reinstalling Office?
Yes, you only need to update the connection string and ensure the ODBC driver is installed. Reinstalling Office is unnecessary unless the core application files are corrupted.
What is the difference between 32-bit and 64-bit ODBC drivers?
The bitness of the driver must match the bitness of your Excel installation. Using a mismatched driver will prevent Excel from establishing a connection, even if the driver itself is functional.
How do I export a working connection string for backup?
You can view the connection string in the Query Properties dialog under the Definition tab. Copy this text and save it in a secure document to restore connections quickly if they break again.
Does refreshing data clear the previous results?
No, refreshing replaces the existing data with the latest values from the source. Your formulas and formatting remain intact, but the underlying cell contents are updated to reflect the current state of the database.