• 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

Write to word tablecell with Java, Apache POI?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have word document with a table in. I want to insert text in those cells with Java and I have added Apache POI to my project...

However, I have only succeed to read from the document. My application gets all cells in the table... But I dont know how to insert new text in each cell? Any ideas?

Thanks in advanced

 
Saloon Keeper
Posts: 5809
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The POI HWPF and XWPF APIs are quite limited in what they can do, particularly with respect to altering documents (as opposed to reading them). Read http://poi.apache.org/document/quick-guide.html to get a feeling for how limited. If you look through the code examples at http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/ you may find some useful stuff, but frankly, I doubt that you will be successful. I looked into this some years ago, and re-reading it now, the situation doesn't seem to have improved much.
 
Rancher
Posts: 4273
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue is they haven't had anyone to actually take ownership of the project for years.
It's essentially stagnated and, as the link Tim posted says, it's never come out of the scratchpad.
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this is a long time since posted but

row.createCell() creates a new cell in a row.

Mark
 
Water proof donuts! Eat them while reading this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!