If you must use RTF, here's a very simple solution: Simply do a search (for the template string) and replace (with your string) using the Java regex engine, treating the RTF as a plain binary file.
Karthik Kumar Contractor MBS/ABS Analytics Banc of America Securities, LLC (704) 683-5188 -----Original Message----- From: Angelo zerr [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 5:33 AM To: POI Users List Subject: Re: How can i fill the template(word doc) from java program Hello, if you can use RTF format, you could see RTFTemplate which is RTF engine RTF to RTF which is able to merge a RTF model design with MERGEFILED, with a JAVA context to obtain a RTF target (MERGEFIELD are transformed with the value of your jAVA context). You can find RTFTemplate at http://rtftemplate.sourceforge.net/ Regards Angelo 2006/5/25, Andrew Shumway <[EMAIL PROTECTED]>: > > Like I said, there is a sample project out there for doing this with > Excel. > You can follow what they have done and do it again for Word docs. It > won't be easy but that's all I know of that will do this. > > --andrew shumway > > -----Original Message----- > From: Manjula G (manjg) [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 25, 2006 9:11 AM > To: POI Users List > Subject: RE: How can i fill the template(word doc) from java program > > The template is in the word document & the final output should be in > the word document only.So I cannot be using Excel files to achive the > same.I would want something which can read the word document & fill in > the required data in the given template dynamically. > > -----Original Message----- > From: Andrew Shumway [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 25, 2006 7:15 PM > To: 'POI Users List' > Subject: RE: How can i fill the template(word doc) from java program > > > There is a way to do this with Excel files. Like the approach you > mention, it uses the Jakarta.poi project's HSSF (excel counterpart to > the word HWFP) utilities. > > However, we also use the open-source http://jxls.sourceforge.net/ > project which defines the template metatags and actually does all of > the file reading, manipulation and serialization. > > So, I'm confident that poi's HSSF can be used to do this but > developing enough structure in a free-form word document as well as > the meta-tagging could be a challenge > > --andrew shumway > -----Original Message----- > From: Manjula G (manjg) [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 25, 2006 2:57 AM > To: [email protected] > Subject: How can i fill the template(word doc) from java program > > Hi All, > > I need to read the template(word doc) & fill in the template > according to the input data.How can i achive this in java.Is it > possible to do it with HWPF! Kindly help me. > > Thanks, > Manjula > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
