Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS Excel Connection Manager failed to Connect to the Source

I have a server that is capable of creating and running an Excel Import task using the Import Wizard. I am trying to automate that process by using a visual Studio 2010 Integration Services package, that I am developing on that server.

The problem happens when trying to design the package. I have added an excel connection and pointed it at the Excel file on a local disk (the same file I have already successfully imported using the import wizard). When I add an Excel Source to the DataFlow and specify the excel connection, when I go to the Name Of the Excel Sheet Drop down I just see "No tables or views can be loaded" and get the following error.

"Could not retrieve the table information for the connection manager. Failed to connect to the source using the connection manager ..."

I can't find this error logged anywhere and i don't know why it is failing. The directory is shared to Authenticated users and the file is not in use.

Any ideas how to debug this error? I understand there can be issues running this in 64 bit mode, but does that apply to development?

I should add that it is an excel 2007 file .XLSX and the connection is set to Excel 2007.

2019-11-08 The answer by GavB841 below looks promising, if anyone tries it and it works please let me know. (I am no longer working in this area.)

like image 759
PatFromCanada Avatar asked May 27 '14 18:05

PatFromCanada


People also ask

How do I use Excel connections manager in SSIS?

In the Connection Managers area, right-click and select New connection. In the Add SSIS Connection Manager dialog box, select EXCEL and then Add. On the SSIS menu, select New connection. In the Add SSIS Connection Manager dialog box, select EXCEL and then Add.


4 Answers

It seems like the 32-bit version of Excel was not installed. Remember that SSDT is a 32-bit IDE. Therefore, when data is access from SSDT the 32-bit data providers are used. When running the package outside of SSDT it runs in 64-bit mode (not always, but mostly) and uses the 64-bit data providers.

Always keep in mind that if you want to run your package in 64-bit (which you should aim for) you will need both the 32-bit data providers (for development in SSDT) as well as the 64-bit data providers (for executing the package in production).

I downloaded the 32-bit access drivers from:

  • Microsoft Access Database Engine 2010 Redistributable.

After installation, I could see the worksheets


Source:

  • Extracting Data From Excel with SSIS
like image 155
Rishit Avatar answered Oct 11 '22 00:10

Rishit


The workaround is, I save the excel file as excel 97-2003 then it works fine

like image 23
PatFromCanada Avatar answered Oct 10 '22 23:10

PatFromCanada


I also ran into this problem today, but found a different solution from using Excel 97-2003. According to Maderia, the problem is SSDT (SQL Server Data Tools) is a 32bit application and can only use 32bit providers; but you likely have the 64bit ACE OLE DB provider installed. You could play around with trying to install the 32bit provider, but you can't have both the 64 & 32 version installed at the same time. The solution Maderia suggested (and I found worked for me) was to set the DelayValidation = TRUE on the tasks where I'm importing/exporting the Excel 2007 file.

like image 20
Manzabar Avatar answered Oct 11 '22 00:10

Manzabar


The recommendations from this article Extracting Data From Excel with SSIS resolved the issue for me.

I downloaded MS Access Database Engine 2010 32 bit driver from the link in that article.

Also set Project Configuration Properties for Debugging Run64BitRuntime = False

In SQL Server 2014 SSMS (Integration Service Catalog -> SSISDB -> Environments -> Projects for all Packages in Validate checked box 32 bit Runtime.

My SSIS packages are working now in both VS 2013 and SQL Server 2014 environments.

like image 30
Michael Alfes Avatar answered Oct 11 '22 01:10

Michael Alfes