logo
search
Data Import & Export

How to Fix Excel Data Could Not Be Retrieved from the Database Error

Huma Ashraf ChHuma Ashraf Ch Oct 13, 2026 869 views

Question details

The user is encountering an error preventing them from importing or refreshing data from an external database or another Excel workbook.

How to Fix the Excel Data Could Not Be Retrieved from the Database Error
Product
Excel
Device & OS
not provided
Scenario
Importing or refreshing data connections linked to an external Excel workbook.
Observed behavior
Excel displays a "Data could not be retrieved from the database" error message and fails to update or import the external data.
Before you start

Ensure you have read access to the network drive or local folder where the source workbook is stored, and confirm that the source file hasn't been accidentally deleted or renamed.

Solution 1Recommended

Verify and Reconnect the Data Source

Checking the source file path and refreshing the data source settings is the most effective way to restore the connection to the external workbook.

This error frequently occurs when the linked source file is moved, renamed, or temporarily locked by another process. By updating the connection properties in Excel, you can quickly re-establish the link.

1
Check the source file

Navigate to the folder where your source Excel workbook is saved to verify the file name and path are correct, and ensure the file is not currently open in another application.

2
Access data settings

Open the Excel workbook experiencing the error, go to the 'Data' tab on the ribbon, and click on 'Queries & Connections'.

3
Update the source

Right-click the problematic connection in the side panel, select 'Properties', navigate to the 'Definition' tab, and update the connection string to ensure it points to the correct file path.

4
Refresh the connection

Click 'Refresh All' under the Data tab to test if the connection to the database or external workbook has been restored successfully.

Verify and Reconnect the Data Source
File Locking Issue: If the source workbook is locked by another user on a shared network drive, you may need to ask them to close the file before Excel can retrieve the data.

Seamlessly Import and Manage External Data with WPS Office

WPS Spreadsheets offers a robust, free, and lightweight solution for managing external data imports and connections. Experience a familiar interface and flawless compatibility with Microsoft Excel files without the hassle of connection errors.

  1. 1. Open WPS Spreadsheets: Launch WPS Office and open a new or existing spreadsheet.
  2. 2. Navigate to the Data Tab: Click on the 'Data' tab located at the top ribbon menu to access data management tools.
  3. 3. Import External Data: Select 'Import Data' to securely connect to external workbooks or databases without complicated configurations.
  4. 4. Manage Connections: Use the 'Edit Links' feature under the Data tab to easily update file paths and refresh your linked sources.
Easily manage external data connections without complex database retrieval errorsFully compatible with Microsoft Excel (.xlsx, .xls) files and formatsLightweight application that uses fewer system resources and opens files rapidlyFree to use with a highly intuitive, familiar user interface for seamless migration
QA img-9

Frequently Asked Questions

Why does Excel say data could not be retrieved from the database?

This usually happens if the source file has been moved, renamed, deleted, or is currently locked by another application or user on a shared network.

How do I fix a broken data connection in Excel?

Go to the Data tab, click on Queries & Connections, right-click your broken connection to select Properties, and update the exact file path in the Definition tab.

Can I retrieve data from a workbook stored on a shared network drive?

Yes, but ensure you have the correct network permissions and that the network drive is actively connected and accessible before refreshing the data in Excel.

Will this database error occur if the source file is corrupted?

Yes, trying to pull data from a corrupted file or an unsupported format can trigger data retrieval errors. Always ensure the source is a valid and working Excel workbook.