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. Web Development
  3. ASP.NET
  4. Is Office required to have installed on the machine with Interop dll?

Is Office required to have installed on the machine with Interop dll?

Scheduled Pinned Locked Moved ASP.NET
csharpcomsysadminhelp
8 Posts 6 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.
  • S Offline
    S Offline
    sudevsu
    wrote on last edited by
    #1

    Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

    Your help is much appreciated. Thanks Happy Coding!

    F Richard DeemingR P J M 5 Replies Last reply
    0
    • S sudevsu

      Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

      Your help is much appreciated. Thanks Happy Coding!

      F Offline
      F Offline
      F ES Sitecore
      wrote on last edited by
      #2

      "Interop" dlls are just .net wrappers around COM objects that allow your .net code to use the underlying COM objects. For the code to function after being deployed, the COM object the interop is a wrapper for needs to exist, so in your case those objects are provided by Excel, so Excel needs to be installed on the server. Legal and license issues aside, you're not going to get this working reliable (if at all) and it isn't supported by Microsoft. Look to another way of generating excel files like Open XML, Adpose, the excel odbc driver, DocX etc.

      1 Reply Last reply
      0
      • S sudevsu

        Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

        Your help is much appreciated. Thanks Happy Coding!

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        Considerations for server-side Automation of Office[^]:

        Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

        There are various ways to create Excel spreadsheets on the server without using Office interop. For example:

        • EPPlus[^];
        • ClosedXML[^];
        • The OpenXML SDK[^];

        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        S 1 Reply Last reply
        0
        • S sudevsu

          Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

          Your help is much appreciated. Thanks Happy Coding!

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Yes, so don't use interop.

          S 1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            Considerations for server-side Automation of Office[^]:

            Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

            There are various ways to create Excel spreadsheets on the server without using Office interop. For example:

            • EPPlus[^];
            • ClosedXML[^];
            • The OpenXML SDK[^];

            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            S Offline
            S Offline
            sudevsu
            wrote on last edited by
            #5

            Thanks Richard

            Your help is much appreciated. Thanks Happy Coding!

            1 Reply Last reply
            0
            • P PIEBALDconsult

              Yes, so don't use interop.

              S Offline
              S Offline
              sudevsu
              wrote on last edited by
              #6

              sweet and simple Thank you.

              Your help is much appreciated. Thanks Happy Coding!

              1 Reply Last reply
              0
              • S sudevsu

                Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

                Your help is much appreciated. Thanks Happy Coding!

                J Offline
                J Offline
                jkirkerx
                wrote on last edited by
                #7

                I use it on Windows Apps, when you turn visibility on, Excel loads, and you can watch the spreadsheet build, and then you can save it. It's pretty slow, until you start optimizing your code. So ya, don't use it on a server. But that's how it works.

                1 Reply Last reply
                0
                • S sudevsu

                  Hello Experts, I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?

                  Your help is much appreciated. Thanks Happy Coding!

                  M Offline
                  M Offline
                  mohit90
                  wrote on last edited by
                  #8

                  Hi, You Can use Open XMl SDK 2.0 or higher for the Export/Import excel functionality. Plase have a look at my below article. http://www.codeproject.com/Articles/884166/Excel-worksheets-by-using-the-Open-XML-SDK[^] If you want i can upload e example too.

                  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