This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes poi problem with reading and writing in the same word file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "poi problem with reading and writing in the same word file" Watch "poi problem with reading and writing in the same word file" New topic
Author

poi problem with reading and writing in the same word file

Raluca Stanculescu
Greenhorn

Joined: Mar 19, 2010
Posts: 3
Hello everybody,

I haven't been able to find a solution to this problem for a while now. You are my last hope.
I am trying to fill out a word document from java with text (it's a CV type thing) and tables.
Anyway it goes something like this



The problem is that while poi 3.6 doesn't keep the same fonts and format of the initial file, poi 3.2 (I read on a forum that it will work), does keep some of the formatting but it still is no good at all.

I find it unbelievable that something as important as this does not work.

Kind regards,

Raluca
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
The DOC support of POI is rather basic, especially when it comes to changing existing documents. If you need to use DOC, consider using OpenOffice's Java API through OO's server mode. Or maybe use a format that's easier to work with, like RTF which is just text, and thus amenable to string search/replace operations.


Ping & DNS - my free Android networking tools app
Raluca Stanculescu
Greenhorn

Joined: Mar 19, 2010
Posts: 3
Thanks!
I have decided to go another way with this, by using this API.
http://rtftemplate.sourceforge.net/
Luckily it meets all my needs.


Hope this helps somebody.

Raluca
 
jQuery in Action, 2nd edition
 
subject: poi problem with reading and writing in the same word file
 
Similar Threads
Jakarta POI: Please help me get started with doc files
Creating word documents file from templates.
java.io.FileNotFoundException
Mearging two word documents using POI
POI HWPF - How to set custom size of page layout