List of usage examples for org.apache.poi.hslf.usermodel HSLFTable getCell
@Override
public HSLFTableCell getCell(int row, int col)
From source file:org.apache.tika.parser.microsoft.HSLFExtractor.java
License:Apache License
private void extractTableText(XHTMLContentHandler xhtml, HSLFTable shape) throws SAXException { xhtml.startElement("table"); for (int row = 0; row < shape.getNumberOfRows(); row++) { xhtml.startElement("tr"); for (int col = 0; col < shape.getNumberOfColumns(); col++) { HSLFTableCell cell = shape.getCell(row, col); //insert empty string for empty cell if cell is null String txt = ""; if (cell != null) { txt = cell.getText();/*w w w . jav a 2 s . c o m*/ } xhtml.element("td", txt); } xhtml.endElement("tr"); } xhtml.endElement("table"); }