Yes, this works well. You really only need the BLOB option if there is more than ascii in the file (eg pictures).
WIth Oracle you dont even need the cf admin option turned on.
From: "Patrick Branley" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: [cfaussie] Re: creating .doc files in Coldfusion
Date: Wed, 5 Jul 2006 09:31:44 +1000
The other option that works is just to serve up HTML and set the content type to msword/document and set the extension to *.doc in the content-disposition header.
eg.
<cfheader name="Content-Type" value="application/msword" >
<cfheader name="Content-Dispostion" value="attachment; filename=myfile.doc" ><cfoutput>#htmlContent#</cfoutput>
Im pretty sure any version of word past about 97 will open up html files.
You can get the formatting you need by creating the doc in word then saving it as HTML. then just output all the embedded CSS that word puts into the document. Its bascially the same technique as RTF but gives you a bit nice source code to work with to apply formatting to.
hth
Pat
ps. it works with excel documents too.
On 7/5/06, Mark Ireland <[EMAIL PROTECTED]> wrote:There is always the BLOB.
From: "Rod Higgins" < [EMAIL PROTECTED]>
Reply-To: [email protected]
To: < [email protected]>
Subject: [cfaussie] Re: creating .doc files in Coldfusion
Date: Tue, 4 Jul 2006 16:03:42 +1000
>
>I've used POI successfully before. The other option is too create the word
>document save it as html then use CF to create the same html and save as a
>.doc file. If the application's users have Office 2003, xml might be an
>option as well.
>
>All options work it just depends on your needs.
>
>----- Original Message -----
>From: "<cfgroupie>" < [EMAIL PROTECTED]>
>To: "cfaussie" < [email protected]>
>Sent: Tuesday, July 04, 2006 3:56 PM
>Subject: [cfaussie] creating .doc files in Coldfusion
>
>
> >
> > Hey guys,
> >
> > I have a need to create word documents on the file based on data. Has
> > anyone done this and if so can they point me in the right direction. I
> > had a look at lots of examples on the web using COM objects but they
> > all seem to be having issues.
> >
> > Jeremy
> >
> >
> > >
> >
>
>
>
Find lost friends & family online! Search for free.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---
