CASE STUDY: generating Microsoft Word Documents on a server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    CASE STUDY: generating Microsoft Word Documents on a server

    This problem was proposed to me but not really my area of expertise so I thought I would open it up to the forum to see if anyone had any bright ideas.

    The problem is generating Microsoft Word Documents on a server from Word templates and injecting data from a data source. There are a number of solutions to this problem that are less than satisfactory:

    1. Use the Microsoft Word Object Model is not good as it requires the installation of a client application on a server and it leaves processes open if you are not really careful.
    2. Using WordML is Not great because it's XML and not really word documents.
    3. Using HTML is OK but it's HTML not word at the end of the day.
    4. Using RTF is same problem.

    Requirements:
    1. The documents will be generated on a server, no Word application is installed.
    2. If at all possible the input should be Word documents or Word Template files, so that business users can create them. I will relax this requirement for good alternatives.
    3. The solution should be scalable.
    4. I don't care what technology is used, PHP, Java, .NET?
    5. The solution should work
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Trying to get someone else to do your job for you, eh Mary?

    Comment

    • MMcCarthy
      Recognized Expert MVP
      • Aug 2006
      • 14387

      #3
      Originally posted by Motoma
      Trying to get someone else to do your job for you, eh Mary?
      LOL! Naw ...

      This is just something one of my clients proposed to their IT staff. They asked for my input as well.

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Open Office is scriptable; I believe you can set it up to to file conversions without invoking a GUI as you do with MS Office's craptools.

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          Originally posted by Motoma
          Open Office is scriptable; I believe you can set it up to to file conversions without invoking a GUI as you do with MS Office's craptools.
          Thats Sun's version of Office is it?

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by mmccarthy
            Thats Sun's version of Office is it?
            More or less.
            There is OpenOffice, and there is StarOffice, which is Sun's version.

            Comment

            • MMcCarthy
              Recognized Expert MVP
              • Aug 2006
              • 14387

              #7
              Originally posted by Motoma
              More or less.
              There is OpenOffice, and there is StarOffice, which is Sun's version.
              I remember star office from many years ago but never actually got exposed to open office.

              Comment

              • gits
                Recognized Expert Moderator Expert
                • May 2007
                • 5388

                #8
                hmmm ...

                in case you find a solution based on open office you may be interested in the following odf-to-openXML-converter

                kind regards

                Comment

                • Motoma
                  Recognized Expert Specialist
                  • Jan 2007
                  • 3236

                  #9
                  Originally posted by gits
                  hmmm ...

                  in case you find a solution based on open office you may be interested in the following odf-to-openXML-converter

                  kind regards
                  Well, Open Office can save directly to MS Word Document format, as Mary requested.

                  Comment

                  • gits
                    Recognized Expert Moderator Expert
                    • May 2007
                    • 5388

                    #10
                    yep ... forget about my post ... but i thought it could be an good idea to produce odf at all ... because of its standardization . and only convert it for word in case you need to ...

                    i know that ms is trying to get the office openXML standardized as well and i think this might happen otherwise i think they have to use odf too? ... and isn't openXML the format of word-docs too? sorry ... but i shouldn't had said something in a domain where i'm not an expert ...

                    Comment

                    • MMcCarthy
                      Recognized Expert MVP
                      • Aug 2006
                      • 14387

                      #11
                      Originally posted by gits
                      yep ... forget about my post ... but i thought it could be an good idea to produce odf at all ... because of its standardization . and only convert it for word in case you need to ...

                      i know that ms is trying to get the office openXML standardized as well and i think this might happen otherwise i think they have to use odf too? ... and isn't openXML the format of word-docs too? sorry ... but i shouldn't had said something in a domain where i'm not an expert ...
                      This is just a case study gits. All opinions are welcome.

                      Comment

                      • Motoma
                        Recognized Expert Specialist
                        • Jan 2007
                        • 3236

                        #12
                        Originally posted by mmccarthy
                        This is just a case study gits. All opinions are welcome.
                        As gits stated, there are STANDARDIZED formats which I would strongly urge clients to use. Almost all document editors can utilize these formats, as opposed to proprietary formats. Microsoft is really pushing to get its format to be an ISO standard, however they haven't succeeded with that yet.

                        Comment

                        • MMcCarthy
                          Recognized Expert MVP
                          • Aug 2006
                          • 14387

                          #13
                          The client who originally put this problem forward has come up with the following solution.

                          Apache POI - Java API To Access Microsoft Format Files

                          Its interesting stuff.

                          Comment

                          • r035198x
                            MVP
                            • Sep 2006
                            • 13225

                            #14
                            Originally posted by mmccarthy
                            The client who originally put this problem forward has come up with the following solution.

                            Apache POI - Java API To Access Microsoft Format Files

                            Its interesting stuff.
                            The integration of the template and the database data would range from being a trivial exercise to very complex depending on the complexity of the reports required.

                            Might as well throw away everything and use ireports. It's easy to design reports on it and create .jasper files which are easily convertible to .doc and .pdf files. The sql will be tied to the report itself and you can make some complicated reports on it.
                            We are using ireports a lot at work.

                            Using the poi with Java is very easy of course but there is no mechanism that ties sql queries to the .docs themselves. You'd have to couple them yourself.

                            Comment

                            • Motoma
                              Recognized Expert Specialist
                              • Jan 2007
                              • 3236

                              #15
                              Crystal Reports can generate word documents too, I believe.

                              Comment

                              Working...