Skip to main content

TdxSpreadSheetFormulaErrorCode Enum

Enumerates codes of all errors that can occur when the spreadsheet formula engine parses or evaluates a spreadsheet formula, conditional formatting, or calculated field expression.

Declaration

TdxSpreadSheetFormulaErrorCode = (
    ecNone,
    ecNull,
    ecDivByZero,
    ecValue,
    ecRefErr,
    ecName,
    ecNUM,
    ecNA
);

Members

Name
ecNone
ecNull
ecDivByZero
ecValue
ecRefErr
ecName
ecNUM
ecNA

Remarks

Options include:

Value (Error Code)

Cell Message

Microsoft Excel® Error Type (the ERROR.TYPE function result)

Calculated Field Error Codes

Description

ecNone

The calculated result of a parsed expression.

#N/A

0

No error occurs. The formula engine has correctly parsed and calculated an expression or the target data cell does not belong to a calculated field.

ecNull

#NULL!

1

1

Occurs when a function within a parsed expression accepts one or more incorrectly specified parameters. For instance, this error can occur if there is no separator character between listed references or an unsupported operator is used to specify a parameter (such as a value range operator in a calculated field expression).

This error corresponds to the #NULL! error type in Microsoft Excel®.

ecDivByZero

#DIV/0!

2

2

Occurs when a parsed expression contains a division by zero (for instance, if a divisor subexpression within an expression evaluates to zero).

This error corresponds to the #DIV/0! error type in Microsoft Excel®.

ecValue

#VALUE!

3

3

Occurs when a function within a parsed expression accepts a parameter whose value type does not match with the corresponding parameter’s type that the function syntax requires. For instance, this error can occur if a function accepts a numeric value instead of a string constant. Refer to individual function descriptions for details.

This error corresponds to the #VALUE! error type in Microsoft Excel®.

ecRefErr

#REF!

4

4

Occurs when a parsed expression contains an incorrect reference to a value source (such as a cell, cell range, data field reference in case of a calculated field expression, etc).

This error corresponds to the #REF! error type in Microsoft Excel®.

ecName

#NAME?

5

5

Occurs when a parsed expression contains an unrecognized name token (due to a misspelled function signature or defined name, for instance). This error also occurs if the expression refers to a registered function signature without an actual implementation.

Call the dxSpreadSheetFunctionsRepository.GetInfoByName function to check if a function signature with the specified name is available to the formula engine. If the signature is available, call its IsValid function to identify whether it is ready for use in an expression.

This error corresponds to the #NAME? error type in Microsoft Excel®.

ecNUM

#NUM!

6

6

Occurs when a function within a parsed expression accepts a value that is outside the valid range for a specific parameter of the function. Different functions and their parameters impose different restrictions on values they accept. Refer to individual function descriptions for details.

This error corresponds to the #NUM! error type in Microsoft Excel®.

ecNA

#N/A

7

7

Occurs when a function within a parsed expression cannot calculate even a single result due to one or more incorrect parameter values. For instance, such an error most frequently occurs when a lookup function cannot find a match for a specified value. Different functions return this error code under different conditions. Refer to individual function descriptions for details.

The built-in NA function returns this error code. The ERROR.TYPE function also returns this code if accepts any other value than a Microsoft Excel-compatible error code.

This error corresponds to the #N/A error type in Microsoft Excel®.

Direct TdxSpreadSheetFormulaErrorCode Type References

The following public API members reference the TdxSpreadSheetFormulaErrorCode type:

IdxSpreadSheetCellData.AsError
Returns a cell value calculation’s error status.
TdxSpreadSheetCell.AsError
Specifies the cell object’s error status.
TdxSpreadSheetCustomFormula.ErrorCode
Returns an error code indicating the parsed formula expression’s evaluation or calculation state.
TdxSpreadSheetVectorValue.ErrorCode
Stores the cell’s error code within a row or column vector.
See Also