use of org.apache.poi.xssf.usermodel.XSSFShape in project poi by apache.
the class TestXSSFReader method getShapesString.
private String getShapesString(XSSFReader.SheetIterator it) {
StringBuilder sb = new StringBuilder();
while (it.hasNext()) {
it.next();
List<XSSFShape> shapes = it.getShapes();
if (shapes != null) {
for (XSSFShape shape : shapes) {
if (shape instanceof XSSFSimpleShape) {
String t = ((XSSFSimpleShape) shape).getText();
sb.append(t).append('\n');
}
}
}
}
return sb.toString();
}
Aggregations