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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0

Scheduled Pinned Locked Moved ASP.NET
helpvisual-studiocomsysadminannouncement
13 Posts 4 Posters 1 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.
  • H HatakeKaKaShi

    Hi Guys Need advises, On my develop PC i am able to generate Excel Reports. However once port to an server this Error Occur :Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. In my Development PC I have already add reference of the Excel object 11. How come when i port to server it can't be detected. I am using VS 2005 Need Help urgently Thanks A million

    KaKaShi HaTaKe

    M Offline
    M Offline
    Michael Sync
    wrote on last edited by
    #2

    HatakeKaKaShi wrote:

    How come when i port to server it can't be detected. I am using VS 2005

    maybe. you doesn't add this dll in your setup... So, what you can do now is that you upload this dll on the server and register it or adding it into GAC. or..install Microsoft Office on the server :)

    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

    H 1 Reply Last reply
    0
    • H HatakeKaKaShi

      Hi Guys Need advises, On my develop PC i am able to generate Excel Reports. However once port to an server this Error Occur :Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. In my Development PC I have already add reference of the Excel object 11. How come when i port to server it can't be detected. I am using VS 2005 Need Help urgently Thanks A million

      KaKaShi HaTaKe

      S Offline
      S Offline
      Shujaat Ullah Khan
      wrote on last edited by
      #3

      Check The properties of dll you added and verify that Copy Local property is set to true.If not make it true and rebuild your Application.

      Shujaat

      H 1 Reply Last reply
      0
      • M Michael Sync

        HatakeKaKaShi wrote:

        How come when i port to server it can't be detected. I am using VS 2005

        maybe. you doesn't add this dll in your setup... So, what you can do now is that you upload this dll on the server and register it or adding it into GAC. or..install Microsoft Office on the server :)

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

        H Offline
        H Offline
        HatakeKaKaShi
        wrote on last edited by
        #4

        But 'Microsoft.Office.Interop.Excel does not have dll right cos i can't seem to find it. where to get the dll of this and how to adding in to GAC? Need helps man Thanks A lot of million

        KaKaShi HaTaKe

        M 1 Reply Last reply
        0
        • H HatakeKaKaShi

          But 'Microsoft.Office.Interop.Excel does not have dll right cos i can't seem to find it. where to get the dll of this and how to adding in to GAC? Need helps man Thanks A lot of million

          KaKaShi HaTaKe

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #5

          As Shujaat suggested, "Copy Local" might work but you need to re-package your setup file.. "Interop.Excel.dll" should be under bin\debug folder.

          HatakeKaKaShi wrote:

          how to adding in to GAC

          sorry. you don't need to add it in to GAC as this dll is COM..

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

          1 Reply Last reply
          0
          • H HatakeKaKaShi

            Hi Guys Need advises, On my develop PC i am able to generate Excel Reports. However once port to an server this Error Occur :Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. In my Development PC I have already add reference of the Excel object 11. How come when i port to server it can't be detected. I am using VS 2005 Need Help urgently Thanks A million

            KaKaShi HaTaKe

            M Offline
            M Offline
            Mitch F
            wrote on last edited by
            #6

            Hi, I have recently encountered the same problem on my PC, my local IIS server would work with OWC11 but the remote server would not. What ended up being the case is that the interop DLL was not installed on the remote server's GAC (global assembly cache). One way to check and see if the Remote server has the correct interop in its GAC is to go onto your remote server, go into Start->Run (it has to be run because Explorer can't browse to it) and type in "C:\windows\assembly\gac". An Explorer window should appear, and if a folder named "Microsoft.Office.Interop.Excel" exists on the remote server, then my suggestion won't help. But, if this folder is missing, you can copy that directory from your local GAC to the Remote server's GAC. A direct copy of the folder from PC to PC works; I had to do this when I was installing my application on my remote server. I hope this helps, Mitch -- modified at 0:51 Friday 16th November, 2007

            H 1 Reply Last reply
            0
            • S Shujaat Ullah Khan

              Check The properties of dll you added and verify that Copy Local property is set to true.If not make it true and rebuild your Application.

              Shujaat

              H Offline
              H Offline
              HatakeKaKaShi
              wrote on last edited by
              #7

              However , i can't seem to set the copy local property to true... May i know how to set it Thanks

              KaKaShi HaTaKe

              S 1 Reply Last reply
              0
              • H HatakeKaKaShi

                However , i can't seem to set the copy local property to true... May i know how to set it Thanks

                KaKaShi HaTaKe

                S Offline
                S Offline
                Shujaat Ullah Khan
                wrote on last edited by
                #8

                Go to Solution Explorer There must be node with name References under this node you will get all the dlls you have added in your project now select the required dll right Click on it and go to properties now You would see the Copy Local property set it to true.

                Shujaat

                1 Reply Last reply
                0
                • M Mitch F

                  Hi, I have recently encountered the same problem on my PC, my local IIS server would work with OWC11 but the remote server would not. What ended up being the case is that the interop DLL was not installed on the remote server's GAC (global assembly cache). One way to check and see if the Remote server has the correct interop in its GAC is to go onto your remote server, go into Start->Run (it has to be run because Explorer can't browse to it) and type in "C:\windows\assembly\gac". An Explorer window should appear, and if a folder named "Microsoft.Office.Interop.Excel" exists on the remote server, then my suggestion won't help. But, if this folder is missing, you can copy that directory from your local GAC to the Remote server's GAC. A direct copy of the folder from PC to PC works; I had to do this when I was installing my application on my remote server. I hope this helps, Mitch -- modified at 0:51 Friday 16th November, 2007

                  H Offline
                  H Offline
                  HatakeKaKaShi
                  wrote on last edited by
                  #9

                  Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. Hi i did what you mention but after that i gotten this error . May i know what's the error Thanks A Million

                  KaKaShi HaTaKe

                  M 1 Reply Last reply
                  0
                  • H HatakeKaKaShi

                    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154. Hi i did what you mention but after that i gotten this error . May i know what's the error Thanks A Million

                    KaKaShi HaTaKe

                    M Offline
                    M Offline
                    Mitch F
                    wrote on last edited by
                    #10

                    I had never experienced that error myself. One suggestion that I will give to you to try and run "regsvr32 dllname.dll" on the DLL that you are using to interface with Excel (this is not the interop DLL that you just copied across). When I did this on my server, I had to run "regsvr32 OWC11.DLL" to get it to work, however, the DLL that you have to register might be under a different name. I hope this helps, Mitch

                    H 1 Reply Last reply
                    0
                    • M Mitch F

                      I had never experienced that error myself. One suggestion that I will give to you to try and run "regsvr32 dllname.dll" on the DLL that you are using to interface with Excel (this is not the interop DLL that you just copied across). When I did this on my server, I had to run "regsvr32 OWC11.DLL" to get it to work, however, the DLL that you have to register might be under a different name. I hope this helps, Mitch

                      H Offline
                      H Offline
                      HatakeKaKaShi
                      wrote on last edited by
                      #11

                      What do u mean by run "regsvr32 dllname.dll" on the DLL? How to do that Please guide Thanks a million

                      KaKaShi HaTaKe

                      M 1 Reply Last reply
                      0
                      • H HatakeKaKaShi

                        What do u mean by run "regsvr32 dllname.dll" on the DLL? How to do that Please guide Thanks a million

                        KaKaShi HaTaKe

                        M Offline
                        M Offline
                        Mitch F
                        wrote on last edited by
                        #12

                        Hi, Is the COM component that you added a reference to in your VS .Net project on the remote server as well? If it isn't you will also have to install that COM component on the server. If it is on the server, open up Command Prompt on the server, and change the directory to the location of that COM DLL. Then, in the command prompt type in "regsvr32 COMDLLNAME.dll" and press enter. You should get a messagebox saying that the DLL was registered correctly. Press OK, and try your ASP project again. Eg, When I did this on my server, I had used the OWC11.dll as the reference to the charting controls. So, once I had located the DLL on the remote server, I had to manually register the COM dll using "regsvr32 OWC11.dll" in command prompt. I hope this helps, Mitch

                        H 1 Reply Last reply
                        0
                        • M Mitch F

                          Hi, Is the COM component that you added a reference to in your VS .Net project on the remote server as well? If it isn't you will also have to install that COM component on the server. If it is on the server, open up Command Prompt on the server, and change the directory to the location of that COM DLL. Then, in the command prompt type in "regsvr32 COMDLLNAME.dll" and press enter. You should get a messagebox saying that the DLL was registered correctly. Press OK, and try your ASP project again. Eg, When I did this on my server, I had used the OWC11.dll as the reference to the charting controls. So, once I had located the DLL on the remote server, I had to manually register the COM dll using "regsvr32 OWC11.dll" in command prompt. I hope this helps, Mitch

                          H Offline
                          H Offline
                          HatakeKaKaShi
                          wrote on last edited by
                          #13

                          I used the above method in the end the message was Entry point Not found Any solutions?

                          KaKaShi HaTaKe

                          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