none
Exception arising after installing Microsoft Access Database Engine 2016 Driver when exporting data table value to Excel File . RRS feed

  • Question

  • I am Software developer and using Microsoft Access for database connection and have Microsoft office 365 installed in my system. We have created some Excel functionality in my software in which we are exporting data table value in a Excel file and  I am installed Microsoft Access Database Engine 2016 Driver for database connection and now after installing  access Driver 2016 in system when we export  to excel then these exception is arising : 

    Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) at Microsoft.Office.Interop.Excel.ApplicationClass.get_Workbooks()

    I have to repair Microsoft office 365 , then it work fine . So without repairing office provide any better solution so that we can implement in our source code and we don't need to repair office again and again in every System wherever installing my software. We are using VB.Net  for source code development( .NET Framewotk )


    Friday, October 30, 2020 4:50 AM

All replies

  • Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass'

    Th error is regarding Office InterOp (PIA), have you installed that properly? => Microsoft Office 2010: Primary Interop Assemblies Redistributable

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, October 30, 2020 7:18 AM
  • Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass'

    Th error is regarding Office InterOp (PIA), have you installed that properly?



    I am using Microsoft office 365 and that is properly installed 
    Friday, October 30, 2020 9:12 AM
  • Praveen16,

    Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a project management application. I suggest you re-post to the following forum:

    https://social.msdn.microsoft.com/Forums/lync/en-US/home?forum=accessdev

    John

    Saturday, October 31, 2020 6:07 PM