paulyoder / LinqToExcel

Use LINQ to retrieve data from spreadsheets and csv files
MIT License
1.06k stars 300 forks source link

It stopped working fine all of the sudden and I get this error IErrorInfo.GetDescription failed with E_FAIL(0x80004005). #148

Open blackmamba85 opened 6 years ago

blackmamba85 commented 6 years ago

I get the following error most of the times and sometimes it works with one file but then it doesn't work anymore and I get the same error. Can anyone help? I don't know what else to do.

at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at LinqToExcel.Query.ExcelUtilities.GetWorksheetNames(ExcelQueryArgs args)
   at LinqToExcel.Query.ExcelUtilities.GetWorksheetNames(String fileName, ExcelQueryArgs args)
   at LinqToExcel.ExcelQueryFactory.GetWorksheetNames()
   at Brenock.Excel.ExtendedExcelHelper.GetDynamicWorksheetData(String fileName, String sheetName) in C:\Users\amartinez\Documents\IMS_4.0\Brenock.IMS.BL\Excel\ExtendedExcelHelper.cs:line 37
   at Brenock.IMS.BL.Logic.OnboardRevenueLogic.ImportActuals(String fullFilePath) in C:\Users\amartinez\Documents\IMS_4.0\Brenock.IMS.BL\Logic\OnboardRevenueLogic.cs:line 637
mrworkman commented 6 years ago

0x80004005 is not a very specific error. Without more details, I can only guess. The excel file could be open in another program, or maybe anti-virus is interfering, or perhaps the file is corrupt?

dmcgiv commented 5 years ago

@blackmamba85 which version did you see this error with? Were you able to resolve it? We had T4 code that using LinqToExcel which seen this exception when running all T4 file at solution level only to run without error when run individually. We were on 1.1.9 and moved to 1.1.11, the upgrade did seem to work but I've see the same issue a couple of times since. In my case all AV was disabled, the excel file was not open and connection were being made in read-only mode.