Forum Discussion
Error importing an Excel database into SQL Server
Error importing an Excel database into SQL Server: An external component threw an exception. (System data)
------------------------------
Program Location:
en System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper)
en System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
en System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
en System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
en System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
en System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
en System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
en System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
en System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
en System.Data.OleDb.OleDbConnection.Open()
en Microsoft.SqlServer.Dts.DtsWizard.DTSWizard.GetOpenedConnection(WizardInputs wizardInputs, String connEntryName)
en Microsoft.SqlServer.Dts.DtsWizard.Step1.OnLeavePage(LeavePageEventArgs e)
How can I solve that problem? I have installed the 32-bit and 64-bit version of Microsoft Access Database Engine 2016 Redistributable and with neither of them it works, it still gives me the same error. I have 64-bit Office installed.
- olafhelperBronze ContributorI don't see any usefull information (in the error message). How do you try to import the Excel file; you haven't mentioned that?
- Oscar9000Copper Contributor
olafhelperFirst from a database already created, I right click and then in tasks, then in import data, I choose that the source will be excel, then I select the excel file that contains the tables but when I give next I get the error of An external component produced an exception. (System. Data), previously I did it this way, it let me load the data without problem, but now I get the error, I have installed the Microsoft Access Database Engine 2016 Redistributable 64-bit and 32-bit, with both it worked before, now it does not work with either, I use Office 2019 and I have Windows 10 Pro, what can I do to fix the error?
I attach screenshots of the error.
- SivertSolemIron ContributorIt could be worth attempting to start "SQL Server xxx Import and Export Data" from your start menu.
It's in the "Microsoft SQL Server xxxx" folder.
- SivertSolemIron ContributorOffice being office, do you have excel open?
If so, close it and try again.- Oscar9000Copper Contributor
SivertSolemWhen I import the data I have excel closed but I still get the error "An external component raised an exception (System.Data)".