You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@poi.apache.org by Valentin Jacquemin <ja...@gmail.com> on 2011/08/25 11:31:45 UTC

HWPF replace text, file corrupted

Hi all,

I planned to use POI to deal with some templating system on word
documents but it seems that basic replacements are not working:

worddoc.getRange().replaceText("MyName", "Dusse");

After this replacement and saving to a file, word is not anymore able
to open it. Such a pity, I think using an Apache solution on this kind
of issues is hopeless for the moment.

If I'm wrong thanks to enlight me

 Regards,

Valentin

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@poi.apache.org
For additional commands, e-mail: general-help@poi.apache.org


Re: HWPF replace text, file corrupted

Posted by Valentin Jacquemin <ja...@gmail.com>.
Thanks for the suggestion Nick. It effectively works better with the
current trunk repository code.

I continue to evaluate agains my current need but I'd be glad to use
an Apache solution...

BR,

Valentin



On Thu, Aug 25, 2011 at 11:53 AM, Nick Burch <ni...@alfresco.com> wrote:
> On Thu, 25 Aug 2011, Valentin Jacquemin wrote:
>>
>> I planned to use POI to deal with some templating system on word
>> documents but it seems that basic replacements are not working
>
> I'd suggest you re-try with a recent nightly build, or wait about a week and
> try with 3.8 beta 4 (when it's released). This area of code has had a lot of
> work recently
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@poi.apache.org
> For additional commands, e-mail: general-help@poi.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@poi.apache.org
For additional commands, e-mail: general-help@poi.apache.org


Re: HWPF replace text, file corrupted

Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 25 Aug 2011, Valentin Jacquemin wrote:
> I planned to use POI to deal with some templating system on word
> documents but it seems that basic replacements are not working

I'd suggest you re-try with a recent nightly build, or wait about a week 
and try with 3.8 beta 4 (when it's released). This area of code has had a 
lot of work recently

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@poi.apache.org
For additional commands, e-mail: general-help@poi.apache.org