SQL, export to word
-
Hi all! In my program, which works with MySQL database, I need to export the result of SQL query to microsoft word. Are there any ways to do this with Qt (or even without, if you know)?
-
You can connect to your database using QSql and export using ActiveQT http://doc.qt.nokia.com/latest/activeqt.html (ActiveX)
But to do it you need to know the Word ActiveX API and, AFAIK, it only work in MS Windows with MS Work installed
-
Hi
I export the data to the Excel by the <ActiveQt>. I believe it can be used for Word.
If you are interested to see the beginning of "this":http://developer.qt.nokia.com/forums/viewthread/1871/ -
All versions of word also support reading .rtf, which is opened by Word by default. That format is much easier to write. Modern versions of Word also support more open, XML based formats. These can also be written directly, or through a library.
-
do you know the name of the wordl library andre?
-
Not from the top of my head, but I know there is such a library in Calligra Suite, a branch-off of KOffice that can write .odt files. Recent versions of Word can read and write those files.