SSIS: excel connection manager unable to connect to excel 2007 - sql-server

In the Excel Connection Manager, when I choose Excel 97-2003 to connect to an Excel(97-2003) data file as a source, I am able to see the data preview and it works fine, but when I choose Excel 2007 to connect to an Excel 2007 file, it gives the error
Failed to connect to the Excel Connection Manager
What should I do?

There are many things to try:
Installing Microsoft Access Database Engine Redistributable
I think that you have to install the Microsoft Access Database Engine Redistributable:
Download Links:
Microsoft Access Database Engine 2010 Redistributable
Microsoft Access Database Engine 2016 Redistributable
Running project in 32-bit Mode
Go to Project Configuration -> Properties -> Debugging -> Set Run64BitRuntime = False
Similar Issues
The following links contains similar issues, you can refer to one of them:
SSIS Excel Connection Manager failed to Connect to the Source
Extracting Data From Excel with SSIS

Related

SSIS error: Connection manager has not been assigned to the Excel

I have an issue trying to import data from Excel file (Source.xlsx) using dtsx package.
The system is Windows Server 2019 Standard and there is no MS Office installation on this server, so I installed MDAC 2010 32 bit and added Excel Connection Manager in the Connection Manager
Excel Connection Manager
After that I added Excel Source in the Data Flow Task, but I couldn't choose name of the Excel sheet with the error:
Data Flow Task: Data Flow Task: A connection manager has not been assigned to the Excel Source.Connections[OleDbConnection]
It's the first time when using MDAC doesn't help in such case. I was looking for any solution and I can assume that only solution is to install MDAC 2010 32bit, but unfortunately it does't help in my case.
It would be so kind to get any suggestions and tips to solve this problem.
Thanks in advance.

Connection manager throw exception when loading .xlsb file using SSIS

I have one .XLSB file (MS excel binary worksheet created using Office 2016) having more than million records. How can I load this using SSIS?
I have both SQL server 2014 and SSDT 2012 & SQL Server 2017 SSDT 2017 on two different PC.
The problem is : In SSIS , I'm using excel source , connection manager as excel, the name of the excel sheet is not appearing. Saying, no table or view could be loaded. However, my excel has sheet in it.
Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Failed to connect to the source using the connection manager 'Excel Connection Manager'
EDIT more on error
As per this : Accessing Excel 2007 Binary (.xlsb) via OleDb ACE installed the access (2016) engine. But, still having problem.
What could be the problem ? Any link would help? Thanks.
Install Microsoft.ACE.OLEDB.12.0 32 bit Provider. Then go to project property -> configuration properties -> Debugging -> set Run64BitRuntime = False.
Click on the image to see details about connection property and file extension
Based on your question you have two problems:
Access Database Engine is not registered error
Reading Xlsb file format using SSIS
Access Database Engine is not registered error
You can refer to the following links for more information on how to solve similar issue:
Access Database engine OLEDB in windows server 2016
Unable to Connect to Excel via SSIS
Reading Xlsb file format using SSIS
You have first to select a normal Excel file from the Excel connection manager (create it manually) then from the ExcelFilePath property change it to the .xlsb path;
Import Excel binary files into SQL Db using SSIS
Alternatives
Using Interop librairies to read from Excel:
Read Excel File in C#
Using Third party librairies to read from Excel:
Aspose.Cells for .NET
Closed XML To Read Excel Files In ASP.NET C#
Using OpenXml librairies:
Parse and read a large spreadsheet document (Open XML SDK)
Convert to csv file

VS 2019 SSIS package can't add SQL Server

I installed Visual Studio 2019 and the SSIS package extensions and created a new project. I'm able to add my SQL Server as a Connection Manager with no issues, but when I then drag a Data Flow Task to the package and drag a Source Assistant into that, I'm not able to select my SQL Server.
The source types shown are Excel, Flat File, and Oracle. If I uncheck the "show only installed source types" then I see SQL Server but I can't pick it.
The interesting thing is on this same box I've been editing an SSIS project with Visual Studio 2017 so I know the SQL Server stuff works fine. However, if I open that existing project none of the connection managers show up in Visual Studio 2019.
Answer: You need the new Microsoft® OLE DB Driver 18 for SQL Server
Context:
This was a s*** show right out of the box (see the comments on GitHub).
https://github.com/MicrosoftDocs/visualstudio-docs/issues/2592
Apparently SSIS was not included in the installer and so it does not install even when you select the Data Storage and Processing package in the installer. SSIS currently can only be installed by downloading via the Marketplace here:
SQL Server Integration Services Projects - Visual Studio Market Place
Under the known issues section, item 1:
SQL Server Native Client (SQLNCLI11.1) is deprecated and not installed
by VS2019. We recommend upgrading to the new Microsoft OLE DB driver
for SQL Server. If you want to continue using SQL Server Native
Client, you can download and install it from here.

SSIS - Microsoft Access Database Engine 2010 Redistributable

I have installed Microsoft Access Database Engine 2010 Redistributable from below link. But I do not understand What do they really mean in the highlighted point in Additional Information section from the given link.
Since SSIS package running on local machines but not on UAT and SIT Servers after installation. Any suggestion Please.
https://www.microsoft.com/en-us/download/details.aspx?id=13255
"The Office System Drivers are only supported under certain scenarios, including:
- Desktop applications which read from and write to various files formats -including Microsoft Office Access, Microsoft Office Excel and text files.
- To transfer data between supported file formats and a database repository, such as SQL Server. For example, to transfer data from an Excel workbook into SQL Server using the SQL Server Import and Export Wizard or SQL Server Integration Services (provided the SSIS jobs run in the context of a logged-on user with a valid HKEY_CURRENT_USER registry hive)."
I don't know if this is what you are looking for.
Microsoft Access Database Engine 2010 Redistributable contains a set of components that allows the user to connect to microsoft office files (such as Excel and Access) even if microsoft office is not installed or you have an older office version (i.e. office 2003).
You can benefit from these components only in 2 cases:
If you are developing an application that connect with office files (excel, access, ...) using libraries such as System.Data.Oledb (or maybe Office.Interop (not sure))
If you are using SQL Server Import and Export Wizard or SQL Server Integration Services (if Microsoft Office and Microsoft Access Database Engine 2010 Redistributable are not installed) you cannot connect to microsoft excel and access using SSIS.)
I will add just some basic overview: the Access Runtime (redistributable) is fully able to operate linking to SQL DB, Excel, etc.
But it has no design features - so one cannot alter or set up any of these links.
One must set up links using full licensed Access. The it will run fine in the runtime.
Implied within this construct is that of course the link path of the runtime machines (to the linked file) must be the same as the full license development machine. In most LAN environments that are properly constructed, and the Access development occurs on the same LAN as the Access users, this is fine because the back end server is a common location to all i.e. something like : R:\MainFolder\database
CahabaData.com

SSIS project error: could not retrieve the table information for the connection manager 'excel connection manager'

I'm new to SSIS. For my practice, I want to transfer data from excel to SQL Server.
I have created a connection manager for MS SQL Server (by selecting Connection manager for OLE DB Connections)
Another connection manager for EXCEL file
I have added an excel source to the Data Flow.
Now, I'm trying to edit the Excel source so that I can view the data inside the Excel file which throws following error.
"could not retrieve the table information for the connection manager 'excel connection manager' Failed to connect to the source using the connection manager ..."
After searching a lot including in StackOverflow posts, I found several causes and fixes for this error.
SQL Data Tools is only available in 32bitversoin. So, install "Microsoft Access Database Engine 2010"
Change DataMigration Property page configurations. Change Run64BitRuntime to False.
Change Excel Connection manager options "Excel Version" to "Microsoft Excel 97-2003" and to other options as well.
Make sure that excel file that I am trying to pull data from is not open while doing all these.
Set DelayValidation property to true
Tried every option found on the Internet but nothing worked. Now, I just want to get this fixed no matter what. Any suggestions to fix this issue would be greatly appreciated.
Problem is Excel data source was Office 2007, a lower version than the Office 2010. In this case, separate drivers are required: 2007 Office System Driver: Data Connectivity Components.
Download and install this:
http://www.microsoft.com/download/en/confirmation.aspx?id=23734
If you have 32-bit version of Office, then please download 32-bit drivers, else download 64-bit drivers.
It worked for me, I just installed this file, {32 bit} (https://www.microsoft.com/en-za/download/confirmation.aspx?id=13255)
Hope this helps you resolve the issue
After trying all of the below possible solutions as mentioned in the question, frustratingly I decided to uninstall SSDT and installed it again and it worked for me though still had to follow the first 2 recommendations below.
SQL Data Tools is only available in 32bitversoin. So, install "Microsoft Access Database Engine 2010"
Change DataMigration Property page configurations. Change Run64BitRuntime to False.
Change Excel Connection manager options "Excel Version" to "Microsoft Excel 97-2003" and to other options as well.
Make sure that excel file that I am trying to pull data from is not open while doing all these.
Set DelayValidation property to true
After researching everywhere finally i have found out temporary solution. Because i have try all the solution installing access drivers but still i am facing same issues.
For excel source,
Before this step you need to change the setting. Save excel file as 2010 format.xlsx
Also set Project Configuration Properties for Debugging Run64BitRuntime = False
Drag and drop the excel source
Double click on the excel source and connect excel. Any way you will get an same error no table or view cannot load....
Click ok
Right click on excel source, click on show advanced edit.
In that click on component properties.
You can see openrowset. In that right side you need to enter you excel sheet name example: if in excel sheet1 then you need to enter sheet1$. I.e end with dollar symbol. And click ok.
Now you can do other works connecting to destination.
I am using visual studio 2017, sql server 2017, office 2016, and Microsoft access database 2010 engine 32bit. Os windows 10 64 bit.
This is temporary solution. Because many peoples are searching for this type of question. Finally I figured out and this solution is not available in any of the website.
For me, it worked by uninstalling Microsoft Access Database Engine 2010 64Bit and installing 32 bit. FYI, I have VS2019 32bit running on Win10 and Excel 64bit.
I was using Excel version 2019 in my PC and in SSIS: Excel Source editor was not showing 2019 version to choose. Hence I selected 2016 as highest version.
This is the mistake I did.
I saved my excel file in MS EXCEL 97-2003 Worksheet in PC and selected same version i.e., MS EXCEL 97-2003 in EXCEL SOURCE EDITOR in Visual Studio.
Solution: we must choose exact version of Excel version which is used in our PC and select the same in excel source editor in visual studio.
Since visual studio is 32 bit install Microsoft Access Database Engine 2010 Redistributable 32 bit version to enable excel driver from below link
https://www.microsoft.com/en-us/download/details.aspx?id=13255
Now, I have a Solution of this problem.
I am using visual studio 2015, MS Excel 2016, OS Window 11 64bit and I didn't even change my DelayValidation property.
Install the Microsoft Access Database 2010 Engine 32bit.
Drag and Drop the Excel Component.
Double click on Component and choose the path with Extension of .xlsx.
Select the Excel version 2007-2010.
Finally I figured out, I hope you can understand.
Just install Microsoft Access Database 2010 Engine 32bit go with the same process it works for me, FYI i have VS2019, Excel 64 bit
I have MS Office 2019 but the version of Excel I believe is 2016. In order for me to use Excel as my destination in SSIS, I have to use Microsoft Excel 97-2003 when configuring the Excel Connection Manager. And it worked. But you have to set the Run64BitRuntime to False if your machine is 64-bit. You can access Run64BitRuntime by right-clicking on your project --> Properties -> Configuration Properties -> Debugging -> Debug Options.
Simple workaround. Open up the Excel data source save as Excel 97-2003 Workbook and in the SSIS Excel connection manager specify the Excel version as Excel 97-2003.

Resources