Reading text in a table from word document
807580Dec 6 2009 — edited Sep 6 2010Hi,
I am trying to read a word doc that contains a table using Java. The requirement is to create rows in a Database Table with the information extracted from the table in the word document.
For example, my word doc has a table like:
Heading Description
Heading1 summary related to heading1
Heading2 summary related to heading2
.....
And my database contains a table named SUMMARY with the following columns:
ID DateAdded FileName Heading1 Heading2 ..... (as many heading columns as the number of rows in my word document table)
So I need to read the document using java, get the description text for each heading and then store that text as a BLOB in the respective table column. I am currently checking the possibility of using POI for this requirement. I have tried an example to store entire word doc as a BLOB to mysql database. But I am not sure how to read each row of the table. Any help is greatly appreciated.
Thanks,
JaiKar