Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Generating doc file using Qt4.3.3
QtWS25 Last Chance

Generating doc file using Qt4.3.3

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 4.3k Views
  • 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.
  • D Offline
    D Offline
    durgeshK
    wrote on last edited by
    #1

    How can we generate doc (MS Word document) file using Qt Library? The problem i am facing is that i have generated report on QTextEdit, now i want to export it to doc file. Is it possible at all using Qt4.3.3.

    Thanks & Regards,
    Durgesh

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      doc is a closed file format. If you know the specifications (which I doubt you do), you can use QFile to output the data in the form you need. However, that probably is not a good plan.

      What you could do, is export to .rtf. That format is open, and powerful enough for most purposes. Word reads it just fine. Alternatively, export to OpenDocument Format (.odf). Word can read it, (though I heard there are issues with it), and Qt is able to export to it.

      Last, you may choose to use Word itself to write .doc documents, using ActiveX. You can use ActiveX though QAxObject.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vcsala
        wrote on last edited by
        #3

        As Microsoft made a promise to open their file formats it is not so closed any more. You can find the file specifications "here":http://msdn.microsoft.com/en-us/library/cc313118.aspx

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          VCsala, I guess you are right. Now just hope the specifications as written there (I did not go through them) are actually implementable. Anyway, I wish durgeshK a lot of luck doing that, even with the complete specs readily available :-)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            durgeshK
            wrote on last edited by
            #5

            Thanks guys for the prompt reply, i think i will try exporting to rich text format, as Andre has rightly pointed that, it is very tough and time consuming to go through and understand the whole document.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved