public final class PivotFieldCollection extends PivotFieldBaseCollection
PivotField
s.Modifier and Type | Method and Description |
---|---|
PivotField |
addCalculated(String fieldName,
String formula)
Adds a calculated
PivotField to the end of the collection of PivotTable fields. |
void |
removeCalculated(String fieldName)
Removes the calculated
PivotField from the collection of PivotTable fields. |
contains, get, get, indexOf, iterator, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PivotField addCalculated(String fieldName, String formula)
PivotField
to the end of the collection of PivotTable
fields.fieldName
- The name of the calculated PivotField
.formula
- The formula of the calculated PivotField
.PivotField
.IllegalStateException
- PivotTable
created from non-worksheet data source cannot be modified.IllegalArgumentException
- fieldName
can't be null
or empty string.IllegalArgumentException
- formula
can't be null
or empty string.IllegalArgumentException
- fieldName
must be unique.public void removeCalculated(String fieldName)
PivotField
from the collection of PivotTable
fields.fieldName
- The name of the calculated PivotField
.IllegalStateException
- PivotTable
created from non-worksheet data source cannot be modified.IllegalArgumentException
- fieldName
can't be null
or empty string.IllegalArgumentException
- Field with specified name doesn't exist.IllegalArgumentException
- Field with specified name is not a calculated field.© GemBox d.o.o. — All rights reserved.