Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

poi problem with reading and writing in the same word file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raluca Stanculescu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!