Page 1 of 1
Data from MySQL into MS Word document
Posted: Thu Nov 13, 2003 8:48 am
by Bill H
Doing some preliminary investigation for a customer at this point, and need to find out if there is a relatively simple way to extract data from a MySQL database on the server and insert it into a MS Word 97 document and store the result on the server with a unique name. Details not needed at this time, but pointers to information will be most appreciated.
Posted: Thu Nov 13, 2003 8:54 am
by twigletmac
Have a look at PHP's COM functions for a starter.
Mac
Posted: Thu Nov 13, 2003 10:30 am
by Bill H
Thanks for the pointer. Looking at it, I have a sinking feeling it wouldn't work on a Unix server? (Yeah, that was a question.)
Posted: Thu Nov 13, 2003 10:35 am
by twigletmac
Not as far as I know, sorry.
Mac
Posted: Thu Nov 13, 2003 10:37 am
by JayBird
Nope, windows only im affraid
Mark
Posted: Thu Nov 13, 2003 10:57 pm
by Bill H
Drat. Any hope for an RTF text file? No, I thought not.
My client presently sends reports as Word docs to this customer of his as email attachments. If I convert him to the MySQL database and online forms (along with the forms for the rest of his customers) it creates a problem for creating the report in a format that can be sent to the customer in the accustomed manner. (Viewing the report online is easy, of course.)
I'm kind of reduced to suggesting outputting the report in a browser, taking a screen shot and saving it as a gif image and sending the image as an email attachment.
Any better idea present itself to you?
Posted: Fri Nov 14, 2003 3:03 am
by JayBird
What about creating a PDF?
Have a look here
http://www.fpdf.org/en/home.php
Mark
Posted: Fri Nov 14, 2003 3:25 am
by twigletmac
PDF would be my choice - nice and generic.
Mac
Posted: Fri Nov 14, 2003 8:24 am
by Bill H
You guys prove a point. A point, in fact that I've made in the past and despite which I fell into the trap myself. It is better to post what one wants to accomplish than to post the problem!
PDF is an excellent solution indeed. Thanks for the input.