Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.apache.poi.ss.formula
Enum FormulaType

    java.lang.Object
      java.lang.Enum<FormulaType>
          org.apache.poi.ss.formula.FormulaType

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<FormulaType>

    @Internal
    public enum FormulaType

extends java.lang.Enum<FormulaType>

Enumeration of various formula types. See Sections 3 and 4.8 of https://www.openoffice.org/sc/excelfileformat.pdf

Enum Constant Summary
`ARRAY` An Array formula ("{=SUM(A1:E1*{1,2,3,4,5}}") https://support.office.com/en-us/article/Guidelines-and-examples-of-array-formulas-7D94A64E-3FF3-4686-9372-ECFD5CAA57C7
`CELL` Regular cell formula
`CONDFORMAT` Conditional formatting
`DATAVALIDATION_LIST` This constant is currently very specific.
`NAMEDRANGE` Named range
`SHARED` A Shared Formula ("{=SUM(A1:E1*{1,2,3,4,5}}") Similar to an array formula, but stored in a SHAREDFMLA instead of ARRAY record as a file size optimization.

Method Summary
`static FormulaType` | `forInt(int code)` Used to transition from `int`s (possibly stored in the Excel file) to `FormulaType`s.
`boolean` | `isSingleValue()`
`static FormulaType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static FormulaType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### CELL

    public static final FormulaType CELL

  Regular cell formula

### SHARED

    public static final FormulaType SHARED

  A Shared Formula ("{=SUM(A1:E1*{1,2,3,4,5}}") Similar to an array formula, but stored in a SHAREDFMLA instead of ARRAY record as a file size optimization. See Section 4.8 of https://www.openoffice.org/sc/excelfileformat.pdf

### ARRAY

    public static final FormulaType ARRAY

  An Array formula ("{=SUM(A1:E1*{1,2,3,4,5}}") https://support.office.com/en-us/article/Guidelines-and-examples-of-array-formulas-7D94A64E-3FF3-4686-9372-ECFD5CAA57C7

### CONDFORMAT

    public static final FormulaType CONDFORMAT

  Conditional formatting

### NAMEDRANGE

    public static final FormulaType NAMEDRANGE

  Named range

### DATAVALIDATION_LIST

    public static final FormulaType DATAVALIDATION_LIST

  This constant is currently very specific. The exact differences from general data validation formulas or conditional format formulas is not known yet

Method Detail

### values

    public static FormulaType[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (FormulaType c : FormulaType.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static FormulaType valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null

### isSingleValue

    public boolean isSingleValue()

  Returns:
    true if this formula type only returns single values, false if it can return multiple values (arrays, ranges, etc.)

### forInt

    public static FormulaType forInt(int code)

  Used to transition from `int`s (possibly stored in the Excel file) to `FormulaType`s.

  Parameters:
    `code` -
  Returns:
    FormulaType
  Throws:
    `java.lang.IllegalArgumentException` - if code is out of range
  Since:
    POI 3.15 beta 3.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.