Skip to content

Class ExcelErrorValue

Namespace: OfficeOpenXml
Assembly: EPPlus.dll

Represents an Excel error.

public class ExcelErrorValue : IEqualityComparer<ExcelErrorValue>

Inheritance

object ← ExcelErrorValue

Derived

ExcelRichDataErrorValue
RichDataReferenceValueError

Implements

IEqualityComparer<ExcelErrorValue>

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

AsCompileResult

Returns the error as a CompileResult

public CompileResult AsCompileResult { get; }

Property Value

CompileResult

Type

The error type

public eErrorType Type { get; }

Property Value

eErrorType

Methods

Create(eErrorType)

Creates an ExcelErrorValue from a ExcelErrorValue

public static ExcelErrorValue Create(eErrorType errorType)

Parameters

errorType eErrorType

The type of error to create

Returns

ExcelErrorValue

The ExcelErrorValue

Equals(object)

Checks if the object is equals to another

public override bool Equals(object obj)

Parameters

obj object

The object to compare

Returns

bool

True if equals

Equals(ExcelErrorValue, ExcelErrorValue)

Determines whether the specified ExcelErrorValue are equal.

public bool Equals(ExcelErrorValue x, ExcelErrorValue y)

Parameters

x ExcelErrorValue

The first object to compare.

y ExcelErrorValue

The first object to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

GetHashCode()

Serves as the default hash function

public override int GetHashCode()

Returns

int

A hash code for the current object

GetHashCode(ExcelErrorValue)

Returns a hash code for the specified object.

public int GetHashCode(ExcelErrorValue obj)

Parameters

obj ExcelErrorValue

The ExcelErrorValue for which a hash code is to be returned

Returns

int

A hash code for the specified object.

Parse(string)

Parses a error value string and returns the ExcelErrorValue

public static ExcelErrorValue Parse(string val)

Parameters

val string

The error code

Returns

ExcelErrorValue

Exceptions

ArgumentNullException

Is thrown when val is empty

ArgumentException

Is thrown when val is not a valid Excel error.

ArgumentException

If the argument cannot be converted.

ToString()

Returns the string representation of the error type

public override string ToString()

Returns

string

Operators

operator +(object, ExcelErrorValue)

Operator for addition.

public static ExcelErrorValue operator +(object v1, ExcelErrorValue v2)

Parameters

v1 object

Left side

v2 ExcelErrorValue

Right side

Returns

ExcelErrorValue

Return the error value in V2

operator +(ExcelErrorValue, ExcelErrorValue)

Operator for addition.

public static ExcelErrorValue operator +(ExcelErrorValue v1, ExcelErrorValue v2)

Parameters

v1 ExcelErrorValue

Left side

v2 ExcelErrorValue

Right side

Returns

ExcelErrorValue

Return the error value in V1

See Also

eErrorType