LinqToExcel throws Error in IE 8 (IErrorInfo.GetDescription failed with E_FAIL(0x80004005).)

0

This is my Code i am getting error when i am trying to do this--- return gis.ToList(); This code actually reads an excel file and maps the data into Model CPR Full Error is: An exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll but was not handled in user code

Additional information: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

And if i am using the same code and run it in Google chrome it is working fine

Please i need help i am stuck

       var excel = new ExcelQueryFactory(strPathName)
        {
            DatabaseEngine = LinqToExcel.Domain.DatabaseEngine.Ace,
            TrimSpaces = LinqToExcel.Query.TrimSpacesType.Both,
            UsePersistentConnection = true,

        };

        var gis = from p in excel.Worksheet<cpr>()
                  select p;
        excel.Dispose();

        return gis.ToList();
.net
asp.net-mvc
entity-framework-6
asked on Stack Overflow Jan 27, 2018 by DAUD WANI • edited Jan 27, 2018 by DAUD WANI

1 Answer

0

I just had this problem. If anyone comes to find this. The solution to this is to check the file path which you are passing to your connection. Your connection can be Oledb for excel or access or openxml.

If you receive an uploaded file, make sure not to change the file name or format from what the user uploaded. Pass the filename as is to your function. If you need to change the filename, you can always do it after the function runs

answered on Stack Overflow Jul 19, 2019 by masksoverflow

User contributions licensed under CC BY-SA 3.0