I\'ve included jakarta-poi-1.5.1-final-20020615.jar file to read content from ms word.
I am unable to do this ...can anyone help me?
Use this code with apache-poi
XWPFDocument doc = new XWPFDocument(new FileInputStream(fileName));
List table = doc.getTables();
for (XWPFTable xwpfTable : table) {
List row = xwpfTable.getRows();
for (XWPFTableRow xwpfTableRow : row) {
List cell = xwpfTableRow.getTableCells();
for (XWPFTableCell xwpfTableCell : cell) {
if (xwpfTableCell != null) {
System.out.println(xwpfTableCell.getText());
String s = xwpfTableCell.getText();
for (XWPFParagraph p : xwpfTableCell.getParagraphs()) {
for (XWPFRun run : p.getRuns()) {
for (XWPFPicture pic : run.getEmbeddedPictures()) {
byte[] pictureData = pic.getPictureData().getData();
System.out.println("picture : " + pictureData);
}
}
}
}
}
}
}