public class XSSFPivotTable extends POIXMLDocumentPart implements PivotTable, java.io.Serializable
DEFAULT_XML_OPTIONS
Constructor and Description |
---|
XSSFPivotTable(PackagePart part,
PackageRelationship rel,
java.util.List<PivotCache> pivotCaches) |
Modifier and Type | Method and Description |
---|---|
protected void |
commit()
Save the content in the underlying package part.
|
long |
getCacheId()
Returns the cache id of the PivotTable.
|
java.util.List<PivotField> |
getColumnFields()
Returns all column fields.
|
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColFields |
getCTColFields() |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTLocation |
getCTLocation() |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRowFields |
getCTRowFields() |
java.lang.String |
getDataCaption()
Returns the data caption.
|
java.util.List<DataField> |
getDataFields()
Returns all data fields.
|
boolean |
getDataOnRows()
Returns whether data on rows or not.
|
CellReference |
getFirstDataRef()
Returns the first data
CellReference |
java.lang.String |
getGrandTotalCaption()
Returns the grand total caption.
|
AreaReference |
getLocationRef()
Returns the location range of the PivotTable.
|
java.lang.String |
getName()
Returns the name of the PivotTable.
|
boolean |
getOutline() |
boolean |
getOutlineData() |
PivotCache |
getPivotCache()
Returns the
PivotCache of the PivotTable. |
PivotField |
getPivotField(java.lang.String name)
Returns the
PivotField . |
java.util.List<PivotField> |
getPivotFields()
Returns all fields of the PivotTable.
|
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableDefinition |
getPivotTableDefinition() |
java.util.List<PivotField> |
getRowFields()
Returns all row fields.
|
java.lang.String |
getRowHeaderCaption()
Returns the row header caption.
|
Sheet |
getSheet() |
protected void |
onDocumentCreate()
Fired when a new package part is created
|
void |
setColumnField(PivotField field)
Sets column type of a pivot field.
|
void |
setColumnItems(java.util.List<java.util.List<ItemInfo>> items)
Serts column items
|
void |
setDataCaption(java.lang.String caption)
Sets the data caption.
|
void |
setDataField(PivotField field,
java.lang.String name,
Calculation subtotal)
Sets data field
|
void |
setDataOnRows(boolean dataOnRows)
Sets data on rows
|
void |
setFirstData(int row,
int col)
Sets the first data row/column index.
|
void |
setFirstHeaderRow(int row)
Sets the first header row.
|
void |
setGrandTotalCaption(java.lang.String caption)
Sets the grand total caption.
|
void |
setLocationRef(AreaReference ref)
Sets the location range of the PivotTable.
|
void |
setName(java.lang.String name)
Sets the name of PivotTable.
|
void |
setOutline(boolean outline) |
void |
setOutlineData(boolean outlineData) |
void |
setPivotCache(PivotCache pivotCache) |
void |
setRowField(PivotField field)
Sets row type of a pivot field.
|
void |
setRowHeaderCaption(java.lang.String caption)
Sets the row header caption.
|
void |
setRowItems(java.util.List<java.util.List<ItemInfo>> items)
Sets row items.
|
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
public XSSFPivotTable(PackagePart part, PackageRelationship rel, java.util.List<PivotCache> pivotCaches) throws java.io.IOException, org.apache.xmlbeans.XmlException
java.io.IOException
org.apache.xmlbeans.XmlException
protected void onDocumentCreate()
POIXMLDocumentPart
onDocumentCreate
in class POIXMLDocumentPart
protected void commit() throws java.io.IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit
in class POIXMLDocumentPart
java.io.IOException
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableDefinition getPivotTableDefinition()
public void setPivotCache(PivotCache pivotCache)
public long getCacheId()
PivotTable
getCacheId
in interface PivotTable
public java.util.List<PivotField> getColumnFields()
PivotTable
getColumnFields
in interface PivotTable
public void setColumnField(PivotField field)
PivotTable
setColumnField
in interface PivotTable
public void setDataCaption(java.lang.String caption)
PivotTable
setDataCaption
in interface PivotTable
public java.lang.String getDataCaption()
PivotTable
getDataCaption
in interface PivotTable
public java.util.List<DataField> getDataFields()
PivotTable
getDataFields
in interface PivotTable
public void setDataField(PivotField field, java.lang.String name, Calculation subtotal)
PivotTable
setDataField
in interface PivotTable
public void setFirstHeaderRow(int row)
PivotTable
setFirstHeaderRow
in interface PivotTable
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTLocation getCTLocation()
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColFields getCTColFields()
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRowFields getCTRowFields()
public void setFirstData(int row, int col)
PivotTable
setFirstData
in interface PivotTable
public void setLocationRef(AreaReference ref)
PivotTable
setLocationRef
in interface PivotTable
public AreaReference getLocationRef()
PivotTable
getLocationRef
in interface PivotTable
public CellReference getFirstDataRef()
PivotTable
CellReference
getFirstDataRef
in interface PivotTable
public void setGrandTotalCaption(java.lang.String caption)
PivotTable
setGrandTotalCaption
in interface PivotTable
public java.lang.String getGrandTotalCaption()
PivotTable
getGrandTotalCaption
in interface PivotTable
public void setName(java.lang.String name)
PivotTable
setName
in interface PivotTable
public java.lang.String getName()
PivotTable
getName
in interface PivotTable
public PivotCache getPivotCache()
PivotTable
PivotCache
of the PivotTable.getPivotCache
in interface PivotTable
public PivotField getPivotField(java.lang.String name)
PivotTable
PivotField
.getPivotField
in interface PivotTable
public java.util.List<PivotField> getPivotFields()
PivotTable
getPivotFields
in interface PivotTable
public java.util.List<PivotField> getRowFields()
PivotTable
getRowFields
in interface PivotTable
public Sheet getSheet()
public void setColumnItems(java.util.List<java.util.List<ItemInfo>> items)
PivotTable
setColumnItems
in interface PivotTable
public void setRowItems(java.util.List<java.util.List<ItemInfo>> items)
PivotTable
setRowItems
in interface PivotTable
public void setRowField(PivotField field)
PivotTable
setRowField
in interface PivotTable
public void setDataOnRows(boolean dataOnRows)
PivotTable
setDataOnRows
in interface PivotTable
public boolean getDataOnRows()
PivotTable
getDataOnRows
in interface PivotTable
public java.lang.String getRowHeaderCaption()
PivotTable
getRowHeaderCaption
in interface PivotTable
public void setRowHeaderCaption(java.lang.String caption)
PivotTable
setRowHeaderCaption
in interface PivotTable
public void setOutline(boolean outline)
setOutline
in interface PivotTable
public boolean getOutline()
getOutline
in interface PivotTable
public void setOutlineData(boolean outlineData)
setOutlineData
in interface PivotTable
public boolean getOutlineData()
getOutlineData
in interface PivotTable
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.