Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. System.Runtime.InteropServices.COMException (0x80040154)

System.Runtime.InteropServices.COMException (0x80040154)

Scheduled Pinned Locked Moved C#
comquestionhelp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Priya Prk
    wrote on last edited by
    #1

    Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this 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. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance

    OriginalGriffO P 2 Replies Last reply
    0
    • P Priya Prk

      Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this 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. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Office.Interop.Excel works by invisibly opening a copy of excel in the background to perform the work - just as you would expect. So yes, you do need Office (or at least the correct version of excel) installed on every machine your software is going to run on.

      All those who believe in psycho kinesis, raise my hand.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • P Priya Prk

        Dear all, I have a application that writes some data to excel sheet. Ofter installing my application on a PC with no Office, when i run it, im getting this 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. at QeKms.Classes.Export.ExportToExcel(DataTable dt, String path) at QeKms.Classes.Export.ExportData() The Microsoft.Office.Interop.Excel.dll is included in the application directory. What is this error mean? Do i have to install MS Office on each computer before running my application? Thanks in advance

        P Offline
        P Offline
        Priya Prk
        wrote on last edited by
        #3

        Thanks for response. Are you sure about that? Do i have to really install ms excel in all machines where i want to run my app? :sigh:

        OriginalGriffO 1 Reply Last reply
        0
        • P Priya Prk

          Thanks for response. Are you sure about that? Do i have to really install ms excel in all machines where i want to run my app? :sigh:

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          Sorry about the delay in replying, but if you had posted it as a reply to my message, rtaher than yours, I would have got an email to tell me there was a reply! By luck I saw this, so can answer... Yes. You have to have Excel installed on every machine that you want to run your app on, if your app uses Interop.Excel. You will get an exception otherwise (as you have seen!)

          All those who believe in psycho kinesis, raise my hand.

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          P 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Sorry about the delay in replying, but if you had posted it as a reply to my message, rtaher than yours, I would have got an email to tell me there was a reply! By luck I saw this, so can answer... Yes. You have to have Excel installed on every machine that you want to run your app on, if your app uses Interop.Excel. You will get an exception otherwise (as you have seen!)

            All those who believe in psycho kinesis, raise my hand.

            P Offline
            P Offline
            Priya Prk
            wrote on last edited by
            #5

            Dear OriginalGriff, Thanks a lot, now i know more about it

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups