Data Import & Export

Fix Excel DataFormat.Error When Importing an Access Query from SQL Server

Rana GarciaRana Garcia Nov 14, 2026 868 views

Question details

The user needs to import an Access query that combines local Access data with linked SQL Server tables into Excel.

Fix Excel DataFormat.Error When Importing an Access Query from SQL Server
Product
Microsoft Excel, Microsoft Access, and SQL Server
Device & OS
not provided
Scenario
Excel imports an Access query whose linked SQL Server tables use an ODBC data source.
Observed behavior
Excel reports “DataFormat.Error: ODBC connection failed” during the import.
Before you start

Identify the Access query, its linked SQL Server tables, and the DSN used by those links. Confirm which account and ODBC driver are used to connect to SQL Server.

Solution 1Recommended

Test the Access links and ODBC connection

Use this approach to determine whether the failure occurs before Excel imports the query.

1
Open the linked tables

Open the database in Access and double-click each linked SQL Server table in the navigation pane. Confirm that its records load without a connection or permission error.

2
Check the DSN

Open ODBC Data Sources and inspect the DSN used by the linked tables. Verify the server, driver, and authentication settings, and use the driver's connection test if available.

3
Verify access

Connect to SQL Server using the same account outside Excel and confirm that it can read the tables used by the Access query. Check that the ODBC driver and DSN are available to the application using them.

4
Run the query and retry

In Access, double-click the query and confirm that it returns results. Then return to Excel and select Data > Refresh All to retry the import.

Test the Access links and ODBC connection
Check driver architecture: 32-bit and 64-bit applications may require different ODBC drivers and DSN configurations. Check the architecture of the application making the connection.
Free Microsoft Office alternative

Work with imported spreadsheet data in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and continue working with imported data as you move between office suites. It does not repair Excel's ODBC connection.

Review and analyze imported data in WPS SpreadsheetsOpen and save Microsoft Excel XLSX filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

How can I tell whether the SQL Server link in Access is working?

Open the Access database and double-click the linked table in the navigation pane. If its records load, run the Access query as well to check the complete data path.

Why might opening Access before Excel help?

Some Access applications create or update linked tables in a startup macro or application code. Opening the database normally can initialize those links before you retry the import in Excel.

Can Excel import the data directly from SQL Server instead?

Yes, if the required data is available on SQL Server. In Excel, select Data > Get Data > From Database > From SQL Server Database and connect to a suitable table or view.

What if the Access query combines local and SQL Server tables?

A SQL Server connection cannot directly query local Access tables. Make the local data available to SQL Server or combine it separately, and adapt the Access SQL if you create a server-side query.

Where do I check the ODBC DSN?

Open ODBC Data Sources and inspect the DSN used by the Access links. Check the server, driver, and authentication settings, and use the driver's connection test if available.