Package org.apache.poi.ss.formula
Enum Class FormulaType
- All Implemented Interfaces:
Serializable
,Comparable<FormulaType>
,Constable
Enumeration of various formula types.
See Sections 3 and 4.8 of https://www.openoffice.org/sc/excelfileformat.pdf
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn 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-ECFD5CAA57C7Regular cell formulaConditional formattingThis constant is currently very specific.Named rangeA 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
Modifier and TypeMethodDescriptionstatic FormulaType
forInt
(int code) Used to transition fromint
s (possibly stored in the Excel file) toFormulaType
s.boolean
static FormulaType
Returns the enum constant of this class with the specified name.static FormulaType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CELL
Regular cell formula -
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
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
Conditional formatting -
NAMEDRANGE
Named range -
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 Details
-
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
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 nameNullPointerException
- 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
Used to transition fromint
s (possibly stored in the Excel file) toFormulaType
s.- Parameters:
code
-- Returns:
- FormulaType
- Throws:
IllegalArgumentException
- if code is out of range- Since:
- POI 3.15 beta 3.
-