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. Populate word with data

Populate word with data

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelp
7 Posts 3 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
    Praveen Kandari
    wrote on last edited by
    #1

    Hi, I have a word document i.e. the report I want. I have already written the lines i want in my document. The issue is I have 15 such files and I want to populate those documents with data from SQL. Is there any way to populate document with sql data. Not talking about export to word. Using Asp.net SQL 2012 TIA

    N 1 Reply Last reply
    0
    • P Praveen Kandari

      Hi, I have a word document i.e. the report I want. I have already written the lines i want in my document. The issue is I have 15 such files and I want to populate those documents with data from SQL. Is there any way to populate document with sql data. Not talking about export to word. Using Asp.net SQL 2012 TIA

      N Offline
      N Offline
      Nathan Minier
      wrote on last edited by
      #2

      Sure, use OpenXML. There's a quick intro at: How to: Open and add text to a word processing document (Open XML SDK)[^]

      P 1 Reply Last reply
      0
      • N Nathan Minier

        Sure, use OpenXML. There's a quick intro at: How to: Open and add text to a word processing document (Open XML SDK)[^]

        P Offline
        P Offline
        Praveen Kandari
        wrote on last edited by
        #3

        Thanks is there any expample online?? and will this dll cause any issue after publishing in server???

        N 1 Reply Last reply
        0
        • P Praveen Kandari

          Thanks is there any expample online?? and will this dll cause any issue after publishing in server???

          N Offline
          N Offline
          Nathan Minier
          wrote on last edited by
          #4

          Yes, please feel free to Google them at your leisure. As for causing issues....like what? I honestly don't know a blessed thing about your server infrastructure and if adding document processing libraries has been known to cause it problems, I daresay that you have bigger issues to address than report generation.

          P 1 Reply Last reply
          0
          • N Nathan Minier

            Yes, please feel free to Google them at your leisure. As for causing issues....like what? I honestly don't know a blessed thing about your server infrastructure and if adding document processing libraries has been known to cause it problems, I daresay that you have bigger issues to address than report generation.

            P Offline
            P Offline
            Praveen Kandari
            wrote on last edited by
            #5

            Thank you for your wonderful reply. by issue I mean Last time I used Interop and after publishing my code in server I was unable to generate any reports...

            Richard DeemingR 1 Reply Last reply
            0
            • P Praveen Kandari

              Thank you for your wonderful reply. by issue I mean Last time I used Interop and after publishing my code in server I was unable to generate any reports...

              Richard DeemingR Online
              Richard DeemingR Online
              Richard Deeming
              wrote on last edited by
              #6

              Office Interop is not supported in ASP.NET, or any other unattended application:

              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.

              OpenXML is supported, and doesn't require Office to be installed on the server.


              "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

              N 1 Reply Last reply
              0
              • Richard DeemingR Richard Deeming

                Office Interop is not supported in ASP.NET, or any other unattended application:

                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.

                OpenXML is supported, and doesn't require Office to be installed on the server.


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

                N Offline
                N Offline
                Nathan Minier
                wrote on last edited by
                #7

                I probably should have included that tidbit. I'm amazed that you didn't supply the GUIDs for the assemblies from memory. :-D

                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