You must Sign In to post a response.
  • Category: .NET

    I am facing the below issue on 64 bit server while generating excel through C#.net code be

    I am facing the below issue on 64 bit server while generating excel through C#.net
    code below is the error

    System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    Regards
    Vinod
  • #761783
    Hi

    This happens when .NET application which uses
    Win32 native code and which is compiled for
    AnyCPU target is executed on Win64 platform.

    Your application will probably run just fine if you
    force to run as a 32-bit application on a 64-bit
    OS ... project properties -> build -> Platform
    Target = x86

    So, to make your application working, you must compile your application for x86 platform, so the 32-bit .NET runtime will be used even on 64-bit OS.
    To do that just specify /platform:x86 in your build script or specify x86 in the "target platform" build option of your project in IDE.

    Regards

    Sridhar Thota.

    Sridhar Thota.
    Editor: DNS Forum.

  • #761786
    Hi

    You can go through Below link

    http://stackoverflow.com/questions/12375943/how-to-create-an-instance-of-excel-if-excel-is-not-installed

    http://stackoverflow.com/questions/881132/retrieving-the-com-class-factory-for-component-failed

    http://www.codeproject.com/Questions/485347/ReadplusandplusWriteplusExcelplusFile


    http://www.c-sharpcorner.com/Forums/Thread/135676/C-Sharp-excel-interop-comexception.aspx

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761823
    Not work with any given solution, still facing the issue.


Sign In to post your comments