Class ExcelErrorValue
Represents an Excel error.
Implements
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelErrorValue : IEqualityComparer<ExcelErrorValue>
Properties
AsCompileResult
Returns the error as a CompileResult
Declaration
public CompileResult AsCompileResult { get; }
Property Value
| Type | Description |
|---|---|
| CompileResult |
Type
The error type
Declaration
public eErrorType Type { get; }
Property Value
| Type | Description |
|---|---|
| eErrorType |
Methods
Create(eErrorType)
Creates an ExcelErrorValue from a eErrorType
Declaration
public static ExcelErrorValue Create(eErrorType errorType)
Parameters
| Type | Name | Description |
|---|---|---|
| eErrorType | errorType | The type of error to create |
Returns
| Type | Description |
|---|---|
| ExcelErrorValue | The ExcelErrorValue |
CreateRichDataError(eErrorType)
Creates a ExcelRichDataErrorValue from a eErrorType
Declaration
public static ExcelRichDataErrorValue CreateRichDataError(eErrorType errorType)
Parameters
| Type | Name | Description |
|---|---|---|
| eErrorType | errorType | The type of error to create> |
Returns
| Type | Description |
|---|---|
| ExcelRichDataErrorValue |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException |
Equals(ExcelErrorValue, ExcelErrorValue)
Determines whether the specified ExcelErrorValue are equal.
Declaration
public bool Equals(ExcelErrorValue x, ExcelErrorValue y)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelErrorValue | x | The first object to compare. |
| ExcelErrorValue | y | The first object to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified objects are equal; otherwise, false. |
Equals(object)
Checks if the object is equals to another
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare |
Returns
| Type | Description |
|---|---|
| bool | True if equals |
Overrides
GetHashCode()
Serves as the default hash function
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object |
Overrides
GetHashCode(ExcelErrorValue)
Returns a hash code for the specified object.
Declaration
public int GetHashCode(ExcelErrorValue obj)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelErrorValue | obj | The ExcelErrorValue for which a hash code is to be returned |
Returns
| Type | Description |
|---|---|
| int | A hash code for the specified object. |
Parse(string)
Parses a error value string and returns the ExcelErrorValue
Declaration
public static ExcelErrorValue Parse(string val)
Parameters
| Type | Name | Description |
|---|---|---|
| string | val | The error code |
Returns
| Type | Description |
|---|---|
| ExcelErrorValue |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Is thrown when |
| ArgumentException | Is thrown when |
| ArgumentException | If the argument cannot be converted. |
ToString()
Returns the string representation of the error type
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Operators
operator +(ExcelErrorValue, ExcelErrorValue)
Operator for addition.
Declaration
public static ExcelErrorValue operator +(ExcelErrorValue v1, ExcelErrorValue v2)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelErrorValue | v1 | Left side |
| ExcelErrorValue | v2 | Right side |
Returns
| Type | Description |
|---|---|
| ExcelErrorValue | Return the error value in V1 |
operator +(object, ExcelErrorValue)
Operator for addition.
Declaration
public static ExcelErrorValue operator +(object v1, ExcelErrorValue v2)
Parameters
| Type | Name | Description |
|---|---|---|
| object | v1 | Left side |
| ExcelErrorValue | v2 | Right side |
Returns
| Type | Description |
|---|---|
| ExcelErrorValue | Return the error value in V2 |