Class ExcelDataValidation
Abstract base class for all Excel datavalidations. Contains functionlity which is common for all these different validation types.
Inheritance
System.Object
ExcelDataValidation
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: EPPlus.dll
Syntax
public abstract class ExcelDataValidation : XmlHelper, IExcelDataValidation
Properties
Address
Address of data validation
Declaration
public ExcelAddress Address { get; }
Property Value
AllowBlank
True if blanks should be allowed
Declaration
public bool? AllowBlank { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
AllowsOperator
True if the validation type allows operator to be set.
Declaration
public bool AllowsOperator { get; }
Property Value
Type |
Description |
System.Boolean |
|
As
Declaration
public ExcelDataValidationAsType As { get; }
Property Value
Error
Declaration
public string Error { get; set; }
Property Value
Type |
Description |
System.String |
|
ErrorStyle
Declaration
public ExcelDataValidationWarningStyle ErrorStyle { get; set; }
Property Value
ErrorTitle
Title of error message box
Declaration
public string ErrorTitle { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
protected string Formula1Internal { get; }
Property Value
Type |
Description |
System.String |
|
Declaration
protected string Formula2Internal { get; }
Property Value
Type |
Description |
System.String |
|
Operator
Operator for comparison between the entered value and Formula/Formulas.
Declaration
public ExcelDataValidationOperator Operator { get; set; }
Property Value
Prompt
Text of the validation message box.
Declaration
public string Prompt { get; set; }
Property Value
Type |
Description |
System.String |
|
PromptTitle
Title of the validation message box.
Declaration
public string PromptTitle { get; set; }
Property Value
Type |
Description |
System.String |
|
ShowErrorMessage
True if error message should be shown
Declaration
public bool? ShowErrorMessage { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
True if input message should be shown
Declaration
public bool? ShowInputMessage { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
Uid
Declaration
public string Uid { get; set; }
Property Value
Type |
Description |
System.String |
|
ValidationType
Declaration
public ExcelDataValidationType ValidationType { get; }
Property Value
Methods
CheckIfStale()
Declaration
protected void CheckIfStale()
Declaration
protected string GetFormula1Path()
Returns
Type |
Description |
System.String |
|
Declaration
protected string GetFormula2Path()
Returns
Type |
Description |
System.String |
|
SetNullableBoolValue(String, Nullable<Boolean>)
Declaration
protected void SetNullableBoolValue(string path, bool? val)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.Nullable<System.Boolean> |
val |
|
SetValue<T>(Nullable<T>, String)
Sets the value to the supplied path
Declaration
protected void SetValue<T>(T? val, string path)
where T : struct
Parameters
Type |
Name |
Description |
System.Nullable<T> |
val |
The value to set
|
System.String |
path |
xml path
|
Type Parameters
Validate()
This method will validate the state of the validation
Declaration
public virtual void Validate()
Exceptions
Type |
Condition |
System.InvalidOperationException |
If the state breaks the rules of the validation
|
Explicit Interface Implementations
IExcelDataValidation.IsStale
Declaration
bool IExcelDataValidation.IsStale { get; }
Returns
Type |
Description |
System.Boolean |
|
Implements