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

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.

Related

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

"Unexpected error from external database driver (1)."

I have .xlsx file with 27,000 rows. When executing the SSIS package on the server I get the above error. I have tried running the package in 32-bit mode, it did not work. Microsoft does not have a good explanation. I have installed access driver on my machine and on the server.
Assuming that you tried running in 32-bit, and you downloaded Access Database Engine and the issue is not solved
This is caused by a windows security update, this is noticed in the Microsoft Support article, also they provided patches link.
There is a similar question on MSDN about this issue, read the accepted answers:
Unexpected error from external database driver (1)
Side Note: Try opening the Excel and saving it as new Excel workbook to ensure that the excel is not damaged
Remove the Ace Oledb driver 10 and install Ace 2016 version .The Security patch Microsoft provided in October 2017 is causing this issue. Test your SSIS package locally ,if everything is fine install Ace 2016 version on your server .
Here is the download link:
Microsoft Access Database Engine 2016 Redistributable
This issue is caused if the Excel file is in Read-Only mode. Changing the Read-Only mode will fix the issue.

SSIS: excel connection manager unable to connect to excel 2007

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

Creating a ssis package using sql server data tools

I am new to ssis.I have a task where i need to import data from table to excel and table contains nearly 500K records.My problem is when opt for excel file destination and create a connection manager and use excel 2007 then i cannot see tables under name of excel sheet.when i tried to install access database engine
i struck with error saying you cannot install 32 bit because you have installed 64 bit of Microsoft products.Please suggest
Here is a link to your access database engine driver. You can choose 32bit and 64bit. Remember to reboot.
Microsoft Excel ACE Driver
You could also choose a flatfile destination as CSV instead, and then load that in Excel. That is easier imo.

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