Package org.apache.poi.xssf.usermodel
Class XSSFPivotTable
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xssf.usermodel.XSSFPivotTable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColLabel
(int columnIndex) Add a col label using data from the given column.void
addColLabel
(int columnIndex, String valueFormat) Add a col label using data from the given column.void
addColumnLabel
(DataConsolidateFunction function, int columnIndex) Add a column label using data from the given column and specified functionvoid
addColumnLabel
(DataConsolidateFunction function, int columnIndex, String valueFieldName) Add a column label using data from the given column and specified functionvoid
addColumnLabel
(DataConsolidateFunction function, int columnIndex, String valueFieldName, String valueFormat) Add a column label using data from the given column and specified functionvoid
addDataColumn
(int columnIndex, boolean isDataField) Add column containing data from the referenced area.void
addReportFilter
(int columnIndex) Add filter for the column with the corresponding index and cell valuevoid
addRowLabel
(int columnIndex) Add a row label using data from the given column.void
readFrom
(InputStream is) void
setCTPivotTableDefinition
(CTPivotTableDefinition pivotTableDefinition) void
setParentSheet
(XSSFSheet parentSheet) void
setPivotCache
(XSSFPivotCache pivotCache) void
setPivotCacheDefinition
(XSSFPivotCacheDefinition pivotCacheDefinition) void
setPivotCacheRecords
(XSSFPivotCacheRecords pivotCacheRecords) Methods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, isCommitted, setCommitted, toString
-
Method Details
-
readFrom
- Throws:
IOException
-
setPivotCache
-
getPivotCache
-
getParentSheet
-
setParentSheet
-
getCTPivotTableDefinition
-
setCTPivotTableDefinition
-
getPivotCacheDefinition
-
setPivotCacheDefinition
-
getPivotCacheRecords
-
setPivotCacheRecords
-
getDataSheet
-
addRowLabel
Add a row label using data from the given column.- Parameters:
columnIndex
- the index of the source column to be used as row label.columnIndex
is 0-based indexed and relative to the first column in the source.
-
getRowLabelColumns
-
addColLabel
Add a col label using data from the given column.- Parameters:
columnIndex
- the index of the source column to be used as row label.columnIndex
is 0-based indexed and relative to the first column in the source.valueFormat
- format of column value (e.g. for date: "DD.MM.YYYY")
-
addColLabel
Add a col label using data from the given column.- Parameters:
columnIndex
- the index of the source column to be used as row label.columnIndex
is 0-based indexed and relative to the first column in the source.
-
getColLabelColumns
-
addColumnLabel
@Beta public void addColumnLabel(DataConsolidateFunction function, int columnIndex, String valueFieldName, String valueFormat) Add a column label using data from the given column and specified function- Parameters:
function
- the function to be used on the data The following functions exists: Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, VarpcolumnIndex
- the index of the source column to be used as column label.columnIndex
is 0-based indexed and relative to the first column in the source.valueFieldName
- the name of pivot table value fieldvalueFormat
- format of value field (e.g. "#,##0.00")
-
addColumnLabel
@Beta public void addColumnLabel(DataConsolidateFunction function, int columnIndex, String valueFieldName) Add a column label using data from the given column and specified function- Parameters:
function
- the function to be used on the data The following functions exists: Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, VarpcolumnIndex
- the index of the source column to be used as column label.columnIndex
is 0-based indexed and relative to the first column in the source.valueFieldName
- the name of pivot table value field
-
addColumnLabel
Add a column label using data from the given column and specified function- Parameters:
function
- the function to be used on the data The following functions exists: Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, VarpcolumnIndex
- the index of the source column to be used as column labelcolumnIndex
is 0-based indexed and relative to the first column in the source..
-
addDataColumn
Add column containing data from the referenced area.- Parameters:
columnIndex
- the index of the column containing the dataisDataField
- true if the data should be displayed in the pivot table.
-
addReportFilter
Add filter for the column with the corresponding index and cell value- Parameters:
columnIndex
- index of column to filter on
-