本文整理了Java中org.apache.poi.xssf.usermodel.XSSFWorkbook.getPivotTables()
方法的一些代码示例,展示了XSSFWorkbook.getPivotTables()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFWorkbook.getPivotTables()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFWorkbook
类名称:XSSFWorkbook
方法名:getPivotTables
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Returns all the pivot tables for this Sheet
*/
@Beta
public List<XSSFPivotTable> getPivotTables() {
List<XSSFPivotTable> tables = new ArrayList<>();
for (XSSFPivotTable table : getWorkbook().getPivotTables()) {
if (table.getParent() == this) {
tables.add(table);
}
}
return tables;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Add pivotCache to the workbook
*/
@Beta
protected CTPivotCache addPivotCache(String rId) {
CTWorkbook ctWorkbook = getCTWorkbook();
CTPivotCaches caches;
if (ctWorkbook.isSetPivotCaches()) {
caches = ctWorkbook.getPivotCaches();
} else {
caches = ctWorkbook.addNewPivotCaches();
}
CTPivotCache cache = caches.addNewPivotCache();
int tableId = getPivotTables().size()+1;
cache.setCacheId(tableId);
cache.setId(rId);
if(pivotCaches == null) {
pivotCaches = new ArrayList<>();
}
pivotCaches.add(cache);
return cache;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
protected void read(InputStream is) throws IOException {
try {
worksheet = WorksheetDocument.Factory.parse(is, DEFAULT_XML_OPTIONS).getWorksheet();
} catch (XmlException e){
throw new POIXMLException(e);
}
initRows(worksheet);
columnHelper = new ColumnHelper(worksheet);
// Look for bits we're interested in
for(RelationPart rp : getRelationParts()){
POIXMLDocumentPart p = rp.getDocumentPart();
if(p instanceof CommentsTable) {
sheetComments = (CommentsTable)p;
}
if(p instanceof XSSFTable) {
tables.put( rp.getRelationship().getId(), (XSSFTable)p );
}
if(p instanceof XSSFPivotTable) {
getWorkbook().getPivotTables().add((XSSFPivotTable) p);
}
}
// Process external hyperlinks for the sheet, if there are any
initHyperlinks();
}
代码示例来源:origin: org.apache.poi/poi-ooxml
private XSSFPivotTable createPivotTable() {
XSSFWorkbook wb = getWorkbook();
List<XSSFPivotTable> pivotTables = wb.getPivotTables();
int tableId = getWorkbook().getPivotTables().size()+1;
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Returns all the pivot tables for this Sheet
*/
@Beta
public List<XSSFPivotTable> getPivotTables() {
List<XSSFPivotTable> tables = new ArrayList<>();
for (XSSFPivotTable table : getWorkbook().getPivotTables()) {
if (table.getParent() == this) {
tables.add(table);
}
}
return tables;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Add pivotCache to the workbook
*/
@Beta
protected CTPivotCache addPivotCache(String rId) {
CTWorkbook ctWorkbook = getCTWorkbook();
CTPivotCaches caches;
if (ctWorkbook.isSetPivotCaches()) {
caches = ctWorkbook.getPivotCaches();
} else {
caches = ctWorkbook.addNewPivotCaches();
}
CTPivotCache cache = caches.addNewPivotCache();
int tableId = getPivotTables().size()+1;
cache.setCacheId(tableId);
cache.setId(rId);
if(pivotCaches == null) {
pivotCaches = new ArrayList<>();
}
pivotCaches.add(cache);
return cache;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
protected void read(InputStream is) throws IOException {
try {
worksheet = WorksheetDocument.Factory.parse(is, DEFAULT_XML_OPTIONS).getWorksheet();
} catch (XmlException e){
throw new POIXMLException(e);
}
initRows(worksheet);
columnHelper = new ColumnHelper(worksheet);
// Look for bits we're interested in
for(RelationPart rp : getRelationParts()){
POIXMLDocumentPart p = rp.getDocumentPart();
if(p instanceof CommentsTable) {
sheetComments = (CommentsTable)p;
}
if(p instanceof XSSFTable) {
tables.put( rp.getRelationship().getId(), (XSSFTable)p );
}
if(p instanceof XSSFPivotTable) {
getWorkbook().getPivotTables().add((XSSFPivotTable) p);
}
}
// Process external hyperlinks for the sheet, if there are any
initHyperlinks();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private XSSFPivotTable createPivotTable() {
XSSFWorkbook wb = getWorkbook();
List<XSSFPivotTable> pivotTables = wb.getPivotTables();
int tableId = getWorkbook().getPivotTables().size()+1;
内容来源于网络,如有侵权,请联系作者删除!