ssis 2015 excel Could not retrieve the table information for the connection manager ‘Excel Connection Manager’ - excel

we've got a Windows Server 2012 R2 with SSIS 2015 installed, and also SAP BO BI 4.2. There is also Office 2016, and we first tried (and then uninstalled) Microsoft Office Access Redistributable 2010 32bit (which had some problems with BO), and then we successfully installed Microsoft Office Access Redistributable 2016 32bit.
Before the redistributable, the SSIS couldn't even see the Excel component in the data flow. We are accessing with some users in RD to the machine, and there is a user which is administrator.
So, the administrator made all the install/uninstall. If we open a SSIS solution with the administrator, and we open a DTSX with an Excel connection, it hangs. If we try to make a new SSIS to point to a new Excel, when we try to open the table we get "Could not retrieve the table information for the connection manager ‘Excel Connection Manager’". That also happens to some of my collegues.
What is extremely strange, is that this doesn't happen to my user. I can connect to the RD, open the SSIS solution, and all the metadata is loaded. I can create a new DTSX, point to the same Excel on the server, and I see the sheets to choose. Somehow, I guess, my user is the only one which is loading correctly the dlls for Access 2016 (if I try to set a different driver, it doesn't load).
I'll try when I get back to work to see if the suggestion here to read from SQL and see if I get the same error from the other users is always the same...but still I need to get why my user is working.
https://mariussqlbi.wordpress.com/2013/09/06/extracting-data-from-excel-with-ssis/
Any help would be appreciated...
Daniele

Related

No Tables or Views when Connecting to Excel file in SSIS

Visual Studio 2019
Excel 365 64-bit
Excel file has a single worksheet named raw_products
I added a Data Flow Task to my Control Flow
Added Excel Source to the Data Flow
Opened the Excel Source and clicked "New" to create a new connection manager.
Selected my Excel file (Noted that the Excel version changed from 97-2003 to 2007-2010 after I selected the file).
I selected Table or View for Data Access Mode and was greeted with the error:
No Tables or Views could be loaded
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'
I went through and tried every version available and none would connect.
A quick search on SO shows that the fixes are anywhere from reverting to Windows 98 or reinstalling VS to installing 32bit or 64bit Access Database drivers.
The purpose of this task is to import the Excel file into my SQL database. If I use the SQL Import Wizard it works perfectly, and I actually saved it as a SSIS package and imported it into the package I'm working on now.
I've tried all the versions available in the connection manager, and I installed the 64bit Access Database Engine drivers (it won't allow me to install the 32bit since I have 64bit office installed). I tried changing the Run64BitRuntime option in the project properties.
I don't want to reinstall VS2019, it took me 4 hours to get it and the Integration Services installed!
EDIT: Against my better judgement I removed VS2019 and Integration Services. It took me almost 8hrs to get them reinstalled and for everything to work again since MS Visual Studio Tools were not removed or registered correctly.
I have reinstalled everything, rebooted at least a dozen times, and I am still having the same issue where it will not show anything. VERY frustrating since this is the most important part of the SSIS package.
You need to Connection manager:
One for the source (Excel) that you already added
One for the target/destination (SQL)
Do you have the second one with SQL? Can you test it if it is successful?
Once it is successful you will have list of tables and you can choose your target table from the list if it exists.

SSIS Excel Connection "No tables or views could be loaded"

I am using Visual Studio 2017 and trying to connect to an Excel file source for a data flow. I have tried all of the following solutions found on StackOverflow and none of them work:
Installed 32-bit Microsoft Access Database Engine for 2010 (I am running 32-bit version of Office)
Changed Run64BitRuntime to "False"
Delay Validation = "True" everywhere, inc the connection manager
Changing the connection string to various suggestions found here and on other sites.
Made sure the Excel file was closed.
I've connected to Excels sources successfully hundreds of times in other lives, but at this new job I've had to install VS myself and I've never had to do that before. Until now, the install has seemed fine and I can do plenty of other things without issue--I just can't connect to an Excel file source. I'm desperate. Any ideas, anyone?
Thanks to any who answer.
Error message I get:
"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'"
I got it to work by uninstalling and then re-installing VS 2017. I suspect--but am not sure--that the key was to have the 32-bit Microsoft Access Database Engine for 2010 installed PRIOR to having the VS 2017 installed. That was not the case when I first installed VS 2017. But after uninstalling VS, I uninstalled then re-installed the 32-bit Access drivers, then reinstalled VS 2017 and my Excel connection worked fine. I also did all of the other steps outlined above prior to trying my connection, though I don't know if they were necessary.

Error in OleDbConnection.Open() when trying to read Excel XLSB

I'm using Visual Studio 2013 with MVC 3 Razor. I'm able to upload and save XLSB file, and I'm trying to read data from the uploaded XLSB. I have the below connection string and method to initialize the OleDbConnection:
strConStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Projects\Excel1.xlsb;Extended Properties='Excel 8.0;HDR=True'";
OleDbConnection connExcel = new OleDbConnection(strConStr);
The error occur at connExcel.Open(). Below is the error message:
An exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll but was not handled in user code
Additional information: This file was created in a previous beta version of Excel 2007. Open the file with Excel 2007 to save it to the most recent version of the Excel 2007 file format before opening the file in Access 2007.
I had AccessDatabaseEngine installed in my PC. In my control panel, I have the following installed engine info:
Name: Microsoft Office Access database engine 2007 (English)
,Size: 19.2 MB
,Version: 12.0.4518.1031
I'm not sure if this is the correct version to read XLSB file. My PC is x64 bit by the way.
My colleague also have the same type of Microsoft Office Access database engine 2007 installed in his PC but his version is "12.0.66XX", the code works fine on his side.
Please let me know if I need to install another version of Access Database Engine, or any other way to resolve this error.
I'm able to resolve this after a long studies and research.
Apart of the Microsoft Office Access database engine 2007 that is already installed in my machine, I also download and install Microsoft Access Database Engine 2010 Redistributable.
After that, I need to download Microsoft Office Access Runtime and Data Connectivity 2007 Service Pack 2 (SP2) to install and then reboot my machine.
Everything work like magic afterwards.
And this is my working connection string:
strConStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Projects\Excel1.xlsb;Extended Properties='Excel 12.0;HDR=True'";

SSIS and 64bit excel

I have researched this thoroughly but I've yet to find a satisfactory answer.
I am using SQL Server Data Tools 2010 and Microsoft Office 2013 64-bit. I know that there is a compatibility problem and I am trying to solve it because I know for a fact that you can use an .xlsx file as a data source in a Data Flow.
First I tried setting Run64BitRuntime to False in Project -> Properties -> Configuration Properties - > Debugging but it didn't work
Whenever I try importing an .xlsx file I get the same error
Microsoft Visual Studio
------------------------------
Could not retrieve the table information for the connection manager
'Source Path'. Failed to connect to the source using the connection
manager 'Source Path'
------------------------------
So I tried downloading the "Microsoft Access database engine 2010" as so many suggested. The 64-bit installed successfully but the 32-bit returned the following error
You cannot install the 32-bit version of Microsoft Access database engine 2010
because you currently have 64-bit Office products installed.
Now I know I am missing a step here cause while I can see "Microsoft Access database engine 2010" in the list of installed programs in control panel it does not show up as an option in the Provider list when I am trying to create a new Connection Manager.
So before I result following the instruction on this blog I would like to ensure there is no easier way of solving the problem
Thank you in advance for you time.
If you're machine is x64, forget about Excel, as there is no driver available.
Just convert the file to CSV and use a Flat File Connector instead.
Ok, the answer was so ridiculously easy that I kind of feel ashamed for this post now.
If you are using Microsoft Office 2013 64-bit and want to work with SSIS you have to download and install the 32-bit Microsoft Access Database Engine 2010 Redistributable, not the 64-bit, set Run64BitRuntime to False and everything will work like a charm.

Cannot read Excel files in SSIS 2008

I'm stuck trying to get SSIS 2008 to read an Excel file.
Yesterday, I migrated our SSIS project from 2005 to 2008, and though the upgrade said it worked, I cannot get it to read an Excel file. I read online that I needed to upgrade the JET drivers to Office 2007 (AccessDatabaseEngine.exe), which I did. And voila! Everything started working!
Unfortunately today, I rebooted my machine, and everything is broke again. Same error as before. I've tried re-installing the JET driver, and even installed SQLExpress 2008, which I read also has the upgraded JET driver. But to no avail.
I cannot even create a brand new SSIS project/package, add an Excel Connection Manager, pointing to a simple Excel file that I made up of just a few numbers in column A, add a new Data Flow Task, and w/in it, add an Excel source using bound to the Excel Connection Manager. When I do something as simple as this, I get:
Unspecified Error (real helpful)
SSIS Error Code: DTS_E_OLEDBERROR
Error Code: 0x80004005
Source: "Microsoft JET Database Engine"
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER
Hresult: 0xC020801C
I don't have a 64bit PC, and I did have everything working until I rebooted my PC.
I only have Office 2003, and I have the SQL2008 Dev Tools installed.
Any help or suggestions would be appreciated. Is there a way to get more detailed information of the failure?
I've had more success in reading office documents on x64 environments using the newer ACE drivers:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en
Your connection string will be something like:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myfile.xls;Extended Properties="Excel 12.0 Xml;HDR=YES";
Might be worth a try!

Resources