C#-SERVICE: ...Excel.Application.Workbooks.Open fails when called from a Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Raj and sandy

    #16
    Thanks Gira..u r rockstar..!!!!! !

    Comment

    • Richard Bone

      #17
      Thanks Downsie. I've been stuck on this for months. I just keep going back to it now and again without success.

      Comment

      • jadranko
        New Member
        • Feb 2012
        • 1

        #18
        I have Win 7 ,32-bit on my computer-and do not understand how is placeing some folder on some location answer on my problem.Do i have to place my excell on that location->>??

        Comment

        • magoriub
          New Member
          • Apr 2012
          • 1

          #19
          response

          Originally posted by downsie
          To resolve this issue follow these steps
          1. Login to the server as a administrator.
          2. Go to "Start" -> "Run" and enter "taskmgr"
          3. Go to the process tab in task manager and check "Show Processes from all users"
          4. If there are any "Excel.exe" entries on the list, right click on the entry and select "End Process"
          5. Close task manager.
          6. Go to "Start" -> "Run" and enter "services.m sc"
          7. Stop the service automating Excel if it is running.
          8. Go to "Start" -> "Run" and enter "dcomcnfg"
          9. This will bring up the component services window, expand out "Console Root" -> "Computers" -> "DCOM Config"
          10. Find "Microsoft Excel Application" in the list of components.
          11. Right click on the entry and select "Properties "
          12. Go to the "Identity" tab on the properties dialog.
          13. Select "The interactive user."
          14. Click the "OK" button.
          15. Switch to the services console
          16. Start the service automating Excel
          17. Test you application again.
          thank very much for everything. your post helped me a lot. my problem was resolved

          Comment

          • welldan
            New Member
            • Apr 2013
            • 1

            #20
            Gira, I know that it's been more than 3 years, but anyway thank you so much! You saved the day :) It was such an easy fix for a unsolvable looking problem!

            Comment

            • xdrtas
              New Member
              • Apr 2013
              • 1

              #21
              Thanks!!!

              Originally posted by downsie
              To resolve this issue follow these steps
              1. Login to the server as a administrator.
              2. Go to "Start" -> "Run" and enter "taskmgr"
              3. Go to the process tab in task manager and check "Show Processes from all users"
              4. If there are any "Excel.exe" entries on the list, right click on the entry and select "End Process"
              5. Close task manager.
              6. Go to "Start" -> "Run" and enter "services.m sc"
              7. Stop the service automating Excel if it is running.
              8. Go to "Start" -> "Run" and enter "dcomcnfg"
              9. This will bring up the component services window, expand out "Console Root" -> "Computers" -> "DCOM Config"
              10. Find "Microsoft Excel Application" in the list of components.
              11. Right click on the entry and select "Properties "
              12. Go to the "Identity" tab on the properties dialog.
              13. Select "The interactive user."
              14. Click the "OK" button.
              15. Switch to the services console
              16. Start the service automating Excel
              17. Test you application again.
              It works!!! Thank you!!!

              Comment

              • Misha3739
                New Member
                • Oct 2013
                • 1

                #22
                @downsie, thank you!)
                But I had to switch user to mentioned user and use my admin account(the service is working under my admin account too). In case of interactive user it didn't work.

                Comment

                • suddenlyNate
                  New Member
                  • May 2018
                  • 1

                  #23
                  I'm necroing this thread because this seemed like such a unique and rare thing that i was trying to do that there wouldn't be any help to do it. I thought, "Really, adding a folder will fix this annoying issue? Fine, i might as well try, i've tried everything else." Then it worked and i cried. Yes, i made an account just to express to Gira my appreciation for his solution almost 10 years ago. THANK YOU SIR's, for all your help!

                  Comment

                  Working...