public class XSSFPivotTable extends POIXMLDocumentPart implements PivotTable
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, toStringpublic XSSFPivotTable(PackagePart part, PackageRelationship rel, java.util.List<PivotCache> pivotCaches) throws java.io.IOException, org.apache.xmlbeans.XmlException
java.io.IOExceptionorg.apache.xmlbeans.XmlExceptionprotected void onDocumentCreate()
POIXMLDocumentPartonDocumentCreate in class POIXMLDocumentPartprotected 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 POIXMLDocumentPartjava.io.IOExceptionpublic org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableDefinition getPivotTableDefinition()
public void setPivotCache(PivotCache pivotCache)
public long getCacheId()
PivotTablegetCacheId in interface PivotTablepublic java.util.List<PivotField> getColumnFields()
PivotTablegetColumnFields in interface PivotTablepublic void setColumnField(PivotField field)
PivotTablesetColumnField in interface PivotTablepublic void setDataCaption(java.lang.String caption)
PivotTablesetDataCaption in interface PivotTablepublic java.lang.String getDataCaption()
PivotTablegetDataCaption in interface PivotTablepublic java.util.List<DataField> getDataFields()
PivotTablegetDataFields in interface PivotTablepublic void setDataField(PivotField field, java.lang.String name, Calculation subtotal)
PivotTablesetDataField in interface PivotTablepublic void setFirstHeaderRow(int row)
PivotTablesetFirstHeaderRow in interface PivotTablepublic 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)
PivotTablesetFirstData in interface PivotTablepublic void setLocationRef(AreaReference ref)
PivotTablesetLocationRef in interface PivotTablepublic AreaReference getLocationRef()
PivotTablegetLocationRef in interface PivotTablepublic CellReference getFirstDataRef()
PivotTableCellReferencegetFirstDataRef in interface PivotTablepublic void setGrandTotalCaption(java.lang.String caption)
PivotTablesetGrandTotalCaption in interface PivotTablepublic java.lang.String getGrandTotalCaption()
PivotTablegetGrandTotalCaption in interface PivotTablepublic void setName(java.lang.String name)
PivotTablesetName in interface PivotTablepublic java.lang.String getName()
PivotTablegetName in interface PivotTablepublic PivotCache getPivotCache()
PivotTablePivotCache of the PivotTable.getPivotCache in interface PivotTablepublic PivotField getPivotField(java.lang.String name)
PivotTablePivotField.getPivotField in interface PivotTablepublic java.util.List<PivotField> getPivotFields()
PivotTablegetPivotFields in interface PivotTablepublic java.util.List<PivotField> getRowFields()
PivotTablegetRowFields in interface PivotTablepublic Sheet getSheet()
public void setColumnItems(java.util.List<java.util.List<ItemInfo>> items)
PivotTablesetColumnItems in interface PivotTablepublic void setRowItems(java.util.List<java.util.List<ItemInfo>> items)
PivotTablesetRowItems in interface PivotTablepublic void setRowField(PivotField field)
PivotTablesetRowField in interface PivotTablepublic void setDataOnRows(boolean dataOnRows)
PivotTablesetDataOnRows in interface PivotTablepublic boolean getDataOnRows()
PivotTablegetDataOnRows in interface PivotTablepublic java.lang.String getRowHeaderCaption()
PivotTablegetRowHeaderCaption in interface PivotTablepublic void setRowHeaderCaption(java.lang.String caption)
PivotTablesetRowHeaderCaption in interface PivotTablepublic void setOutline(boolean outline)
setOutline in interface PivotTablepublic boolean getOutline()
getOutline in interface PivotTablepublic void setOutlineData(boolean outlineData)
setOutlineData in interface PivotTablepublic boolean getOutlineData()
getOutlineData in interface PivotTableCopyright © 2005-2010 Potix Corporation. All Rights Reserved.