Enum Class AggregateFunction

java.lang.Object
java.lang.Enum<AggregateFunction>
io.keikai.axyra.sheets.AggregateFunction
All Implemented Interfaces:
Serializable, Comparable<AggregateFunction>, Constable

public enum AggregateFunction extends Enum<AggregateFunction>
Aggregate function for a pivot table data (values) field.

Mirrors ECMA-376 Part 1 §18.18.18 ST_DataConsolidateFunction, the value set of the subtotal attribute on <dataField>.

  • Enum Constant Details

    • SUM

      public static final AggregateFunction SUM
      Sum of the numeric values (Excel's "Sum").
    • COUNT

      public static final AggregateFunction COUNT
      Number of non-empty values, numbers and text alike, as COUNTA counts (Excel's "Count").
    • AVERAGE

      public static final AggregateFunction AVERAGE
      Arithmetic mean of the numeric values (Excel's "Average").
    • MAX

      public static final AggregateFunction MAX
      Largest numeric value (Excel's "Max").
    • MIN

      public static final AggregateFunction MIN
      Smallest numeric value (Excel's "Min").
    • PRODUCT

      public static final AggregateFunction PRODUCT
      Product of the numeric values (Excel's "Product").
    • COUNT_NUMS

      public static final AggregateFunction COUNT_NUMS
      Number of numeric values only, as COUNT counts (countNums, Excel's "Count Numbers").
    • STD_DEV

      public static final AggregateFunction STD_DEV
      Sample standard deviation (stdDev).
    • STD_DEVP

      public static final AggregateFunction STD_DEVP
      Population standard deviation (stdDevp).
    • VAR

      public static final AggregateFunction VAR
      Sample variance (var).
    • VARP

      public static final AggregateFunction VARP
      Population variance (varp).
  • Method Details

    • values

      public static AggregateFunction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AggregateFunction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • ooxml

      public String ooxml()
      Returns the ST_DataConsolidateFunction token, e.g. "sum" or "countNums".
    • fromOoxml

      public static AggregateFunction fromOoxml(String value)
      Parses an ST_DataConsolidateFunction token, ignoring case.
      Parameters:
      value - the token, e.g. "sum"
      Throws:
      IllegalArgumentException - if value is not a known token