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

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.

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.

ODBC Excel Driver: Unexpected error from external database driver

Since the Windows update from October 10, the ODBC Excel drivers have stopped working. We get the following error when trying to read a file:
"Unexpected error from external database driver (1)"
We open Excel files in Delphi using an ADO connection with the following connection string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
I can get it to work by switching to Microsoft.ACE.OLEDB.12.0, but for that to work, all our customers would have to install the Microsoft Access Database Engine Redistributable on all the computers they use our software on.
Does anybody have another solution or workaround? Thanks in advance.
On a customers machine I have deinstalled KB4041681 (Windows 7) which came with last Microsoft Patch.
On my machine I have deinstalled KB4041676 (Windows 10).
After that Microsoft.Jet.OLEDB.4.0 is now working.
I hope that Microsoft will fix this bug soon.
There is one solution. Replace "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"
with Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyExcel.xls; Extended Properties=\"Excel 12.0;HDR = YES;
After this change you will have to install 2007 Office System Driver: Data Connectivity Components from link on customer machine.
I had the same problem with 2 applications developed by me since 3 years (c# and java).
Since 10-oct-2017 I couldn't export to excel 2003 but 2007 worked, and couldn't import from excel 2003 but 2007 worked too for import.
In ArcGIS Desktop 10.5.1 By ESRI (a most popular software for Geographic processing) Couldn't open excels 2003 and .mdb files.
Temporally Solution: uninstall KB4041693, KB4041687 in windows 8.1 (maybe for w10).
In microsoft changelog of both path say something about "updates [...] and security updates for microsoft jet".
After uninstall and restart all softwares becomes to be normal again.
this problem was introduced in 10-oct-2017.
In microsoft forums this problemas was reported (kb4041693 should "fix" it but still doesn't work).
Maybe in few weeks they will path (properly) this issue.
For me, it worked following these steps:
ps.: We have a Windows Server 2008R2
1 – Download and install this: https://www.microsoft.com/en-us/download/details.aspx?id=23734
2 – Open the .dtsx file and change your Excel connection. On the properties dialog, Click on the three dots in the ConnectionString property and change it to Microsoft Excel 2007. This will automatically change your connection string to:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source={YOURPATH};Extended Properties=”Excel 12.0 XML;HDR=YES”;
3 – Some of our .dtsx files point to a config file (usually has a .dtsConfig extension). I also changed these guys to point to the right provider (pretty much copied and pasted the connection string I got from visual studio)
After this, I ran the SQL Job again and it worked fine.
If you are working with SSIS package then please change your Excel Sheet version 2003 to 2007 in Excel Source or Excel destination.Generally this issue due to excel version.
I had the same problem. Changed Excel 2007 in Excel destinations. It worked. This is same as changing the provider=Microsoft.ACE.OLEDB.12.0.
HERE is the solution... i found it in another forum and work perfectly for me...
it will works 100%
As mentioned in the following:
https://forums.embarcadero.com/thread.jspa?messageID=902557&tstart=0
https://forum.kanors-emr.org/showthread.php?tid=571&pid=2652#pid2652
The KB4041681 installs version 4.0.9801.1 of msexcl40.dll.
Find prior version (4.0.9801.0) of msexcl40.dll
Place in another directory. They suggest the application directory, but since in the next step you will modify registry to point to this older version, it can probably go anywhere.
Update registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Excel\win32 to point to the location from step 2.
Uninstall these updates(according to your OS) and your code will start running normally
KB4041681 - Windows 7 SP1 and Windows Server 2008 R2 SP1
KB4041690 -Windows Server 2012
KB4041693 - Windows 8.1 and Windows Server 2012 R2
KB4041678 - For me this was the issue
https://support.microsoft.com/en-in/help/4041678/windows-7-update-kb4041678
This problem was introduced by a recent update of Microsoft Office. there are not alternative solutions at the moment.

Deploy VS2013 SSIS packages to SQL Server 2012 & edit in VS2012

I'm afraid I know the answer to this already, but I'm hoping someone can point me in a better direction. I just finished developing a large ETL project using VS2013. My dev machine has SQL Server 2012 installed, and everything works perfectly executing from within VS. However, I just went to deploy the project to another device running SQL Server 2012, and got a version error.
I thought if I could open the solution in VS2012, the packages might recompile correctly. However, I can't open them in VS2012 due to version errors again ("version can't be lower than current version" error). I'm pissed because everything worked fine in development with the VS2013/SQL2012 combo, but now suddenly it's no good?!?
Can someone please help me figure out how to get these packages downgraded to work with VS2012/SQL2012? There are only a few script tasks involved if that makes a difference. Mostly it's just basic SSIS tasks and data flows.
Thanks.
I found a workaround how you can "downgrade" your SSIS 2014 packages to SSIS 2012. I wrote it on my blog here:
http://vaniecastro.com/2015/02/26/how-to-downgrade-sql-server-integration-services-2014-packages-to-2012/
The idea is that you need to manually modify the XML file, change the PackageFormatVersion and replace ExecutableType property and componentClassID attribute values to use the DTSX2 Version 2012/01 values instead of the DTSX2 Version 2014/01 ones.
You can try using Visual Studio 2015 SSDT Preview. This now allows you to choose which version of SQL Server you want to target, including SQL Server 2012. I successfully downgraded my packages from VS 2013 / SQL Server 2014 to SQL Server 2012 this way.
https://msdn.microsoft.com/en-us/mt429383.aspx
Once the shell is installed, go to the Project menu=>Project Properties=>Configuration Properties=>TargetServerVersion and choose 2012.

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