本文整理了Java中org.apache.poi.xssf.usermodel.XSSFTable.mapsTo()
方法的一些代码示例,展示了XSSFTable.mapsTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFTable.mapsTo()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFTable
类名称:XSSFTable
方法名:mapsTo
[英]Checks if this Table element contains even a single mapping to the map identified by id
[中]检查此表元素是否包含到由id标识的映射的单个映射
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* @return the list of all Tables that provide a map rule to this mapping
*/
public List<XSSFTable> getRelatedTables() {
List<XSSFTable> tables = new ArrayList<>();
for (Sheet sheet : mapInfo.getWorkbook()) {
for (RelationPart rp : ((XSSFSheet)sheet).getRelationParts()) {
if (rp.getRelationship().getRelationshipType().equals(XSSFRelation.TABLE.getRelation())) {
XSSFTable table = rp.getDocumentPart();
if (table.mapsTo(ctMap.getID())) {
tables.add(table);
}
}
}
}
return tables;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* @return the list of all Tables that provide a map rule to this mapping
*/
public List<XSSFTable> getRelatedTables() {
List<XSSFTable> tables = new ArrayList<>();
for (Sheet sheet : mapInfo.getWorkbook()) {
for (RelationPart rp : ((XSSFSheet)sheet).getRelationParts()) {
if (rp.getRelationship().getRelationshipType().equals(XSSFRelation.TABLE.getRelation())) {
XSSFTable table = rp.getDocumentPart();
if (table.mapsTo(ctMap.getID())) {
tables.add(table);
}
}
}
}
return tables;
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* @return the list of all Tables that provide a map rule to this mapping
*/
public List<XSSFTable> getRelatedTables() {
List<XSSFTable> tables = new Vector<XSSFTable>();
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.getPackageRelationship().getRelationshipType().equals(XSSFRelation.TABLE.getRelation())) {
XSSFTable table = (XSSFTable) p;
if (table.mapsTo(ctMap.getID())) {
tables.add(table);
}
}
}
}
return tables;
}
}
内容来源于网络,如有侵权,请联系作者删除!