Represents a data validation rule which can validate the cell value against a single constraint value or formula.
Inheritance
Constructors
Section titled "Constructors"constructor
public OneConstraintDataValidationRule() Returns OneConstraintDataValidationRule
constructor
public OneConstraintDataValidationRule(OneConstraintDataValidationOperator validationOperator, DataValidationCriteria validationCriteria) Returns OneConstraintDataValidationRule
Properties
Section titled "Properties"ValidationCriteria
Section titled "ValidationCriteria"Inherited from: ValueConstraintDataValidationRule
Gets or sets the criteria to use when validating the cell value against the constraint(s).
public DataValidationCriteria ValidationCriteria { get; set; } AllowNull
Section titled "AllowNull"Inherited from: LimitedValueDataValidationRule
Gets or sets the value which indicates whether a null, or blank, value is allowed to be set on a cell.
public bool AllowNull { get; set; } ErrorMessageDescription
Section titled "ErrorMessageDescription"Inherited from: DataValidationRule
Gets or sets the description which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
public string ErrorMessageDescription { get; set; } ErrorMessageTitle
Section titled "ErrorMessageTitle"Inherited from: DataValidationRule
Gets or sets the title which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
public string ErrorMessageTitle { get; set; } ErrorStyle
Section titled "ErrorStyle"Inherited from: DataValidationRule
Gets or sets the value which indicates whether the value is allowed when it is invalid and which options are given to the user in the error dialog shown by Microsoft Excel.
public DataValidationErrorStyle ErrorStyle { get; set; } ImeMode
Section titled "ImeMode"Inherited from: DataValidationRule
Gets or sets the description of the Japanese input rules.
public DataValidationImeMode ImeMode { get; set; } InputMessageDescription
Section titled "InputMessageDescription"Inherited from: DataValidationRule
Gets or sets the description in the tooltip which appears when the user selects the cell in Microsoft Excel.
public string InputMessageDescription { get; set; } InputMessageTitle
Section titled "InputMessageTitle"Inherited from: DataValidationRule
Gets or sets the title in the tooltip which appears when the user selects the cell in Microsoft Excel.
public string InputMessageTitle { get; set; } ShowErrorMessageForInvalidValue
Section titled "ShowErrorMessageForInvalidValue"Inherited from: DataValidationRule
Gets or sets the value which indicates whether the error dialog should appear in Microsoft Excel when invalid data is entered in the cell.
public bool ShowErrorMessageForInvalidValue { get; set; } ShowInputMessage
Section titled "ShowInputMessage"Inherited from: DataValidationRule
Gets or sets the value which indicates whether to show the user an input prompt tooltip when the user selects the cell in Microsoft Excel.
public bool ShowInputMessage { get; set; } ValidationOperator
Section titled "ValidationOperator"Gets or sets the validation operator to use when comparing the cell value against the constraint value or formula.
public OneConstraintDataValidationOperator ValidationOperator { get; set; } Methods
Section titled "Methods"Clone()
Section titled "Clone()"Inherited from: DataValidationRule
Creates a copy of this rule which can be applied to other worksheets.
public DataValidationRule Clone() Returns any
GetConstraintFormula(string)
Section titled "GetConstraintFormula(string)"Gets the constraint formula used to validate the cell value.
public string GetConstraintFormula(string address) Parameters
- address:
string
Returns any
GetConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "GetConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)"Gets the constraint formula used to validate the cell value.
public string GetConstraintFormula(string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
IsEquivalentTo(DataValidationRule)
Section titled "IsEquivalentTo(DataValidationRule)"Indicates if this rule is structurally equivalent to another.
public override bool IsEquivalentTo(DataValidationRule other) Parameters
- other:
DataValidationRule
Returns any
SetConstraint(DateTime)
Section titled "SetConstraint(DateTime)"Sets the constraint value used to validate the cell value.
public void SetConstraint(DateTime value) Parameters
- value:
DateTime
Returns any
SetConstraint(double)
Section titled "SetConstraint(double)"Sets the constraint value used to validate the cell value.
public void SetConstraint(double value) Parameters
- value:
double
Returns any
SetConstraint(TimeSpan)
Section titled "SetConstraint(TimeSpan)"Sets the constraint value used to validate the cell value.
public void SetConstraint(TimeSpan value) Parameters
- value:
TimeSpan
Returns any
SetConstraintFormula(string, string)
Section titled "SetConstraintFormula(string, string)"Sets the constraint formula used to validate the cell value.
public void SetConstraintFormula(string constraintFormula, string address) Parameters
- constraintFormula:
string - address:
string
Returns any
SetConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)
Section titled "SetConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)"Sets the constraint formula used to validate the cell value.
public void SetConstraintFormula(string constraintFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture) Parameters
- constraintFormula:
string - address:
string - format:
WorkbookFormat - cellReferenceMode:
CellReferenceMode - culture:
CultureInfo
Returns any
TryGetConstraint(out DateTime)
Section titled "TryGetConstraint(out DateTime)"Tries to obtain the value of the constraint.
public bool TryGetConstraint(out DateTime value) Parameters
- value:
DateTime
Returns any
TryGetConstraint(out double)
Section titled "TryGetConstraint(out double)"Tries to obtain the value of the constraint.
public bool TryGetConstraint(out double value) Parameters
- value:
double
Returns any
TryGetConstraint(out TimeSpan)
Section titled "TryGetConstraint(out TimeSpan)"Tries to obtain the value of the constraint.
public bool TryGetConstraint(out TimeSpan value) Parameters
- value:
TimeSpan