+ Reply to Thread
Results 1 to 3 of 3

TYPE_E_LIBNOTREGISTERED Exception in Excel

  1. #1
    Registered User
    Join Date
    04-16-2009
    Location
    Chennai, India.
    MS-Off Ver
    Excel 2003
    Posts
    2

    TYPE_E_LIBNOTREGISTERED Exception in Excel

    Hi All,
    I was trying to Automate MS Excel through C#. Everything works fine
    until in the development machine(it has VS2005 with Excel 2003 in Vista)
    when I deployed my code in a non-development machine(Excel 2003 with XP)
    following exception has been thrown.



    "Unable to cast COM object of type 'System.__ComObject' 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:
    Library not registered. (Exception from HRESULT: 0x8002801D
    (TYPE_E_LIBNOTREGISTERED))."


    a. I ve already tried Installlating Office 2003 PIA's.
    b. Repaired Office 2003 also.

    My Excel references in workspace points to Library in GAC, and "CopyLocal"
    property has been set to false.


    any workaround to resolve this would be greatly appreciated.

    Sample code snippet.

    Excel._Application m_oApplication;
    Excel.Workbooks m_oWorkBooks;
    try-catch
    //
    m_oApplication = new Excel.Application();
    m_oWorkBooks = (Excel.Workbooks)m_oApplication.Workbooks;

  2. #2
    Registered User
    Join Date
    04-14-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: TYPE_E_LIBNOTREGISTERED Exception in Excel

    This is often caused by a corrupt installation. You might try reapplying the latest service pack.
    Last edited by excel_1982; 04-16-2009 at 09:43 AM.

  3. #3
    Registered User
    Join Date
    04-16-2009
    Location
    Chennai, India.
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: TYPE_E_LIBNOTREGISTERED Exception in Excel

    Even after applying the Service Pack same problem Exists, tried Installing PIA's also still the issue exists.
    Thanks in advance.
    Karthik.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1