use of org.apache.poi.xssf.model.SingleXmlCells in project poi by apache.
the class XSSFMap method getRelatedSingleXMLCell.
/**
* @return the list of Single Xml Cells that provide a map rule to this mapping.
*/
public List<XSSFSingleXmlCell> getRelatedSingleXMLCell() {
List<XSSFSingleXmlCell> relatedSimpleXmlCells = new ArrayList<XSSFSingleXmlCell>();
int sheetNumber = mapInfo.getWorkbook().getNumberOfSheets();
for (int i = 0; i < sheetNumber; i++) {
XSSFSheet sheet = mapInfo.getWorkbook().getSheetAt(i);
for (POIXMLDocumentPart p : sheet.getRelations()) {
if (p instanceof SingleXmlCells) {
SingleXmlCells singleXMLCells = (SingleXmlCells) p;
for (XSSFSingleXmlCell cell : singleXMLCells.getAllSimpleXmlCell()) {
if (cell.getMapId() == ctMap.getID()) {
relatedSimpleXmlCells.add(cell);
}
}
}
}
}
return relatedSimpleXmlCells;
}
Aggregations