Represents a data validation rule which can validate the cell value against two constraint values or formulas.

constructor

public TwoConstraintDataValidationRule()

Returns TwoConstraintDataValidationRule

constructor

public TwoConstraintDataValidationRule(TwoConstraintDataValidationOperator validationOperator, DataValidationCriteria validationCriteria)

Returns TwoConstraintDataValidationRule

Inherited from: ValueConstraintDataValidationRule

Gets or sets the criteria to use when validating the cell value against the constraint(s).

public DataValidationCriteria ValidationCriteria { get; set; }

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; }

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; }

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; }

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; }

Inherited from: DataValidationRule

Gets or sets the description of the Japanese input rules.

public DataValidationImeMode ImeMode { get; set; }

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; }

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; }

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; }

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; }

Gets or sets the validation operator to use when comparing the cell value against the constraint values or formulas.

public TwoConstraintDataValidationOperator ValidationOperator { get; set; }

Inherited from: DataValidationRule

Creates a copy of this rule which can be applied to other worksheets.

public DataValidationRule Clone()

Returns any

Gets the lower constraint formula used to validate the cell value.

public string GetLowerConstraintFormula(string address)

Parameters

  • address: string

Returns any

GetLowerConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)

Section titled "GetLowerConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)"

Gets the lower constraint formula used to validate the cell value.

public string GetLowerConstraintFormula(string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture)

Parameters

  • address: string
  • format: WorkbookFormat
  • cellReferenceMode: CellReferenceMode
  • culture: CultureInfo

Returns any

Gets the upper constraint formula used to validate the cell value.

public string GetUpperConstraintFormula(string address)

Parameters

  • address: string

Returns any

GetUpperConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)

Section titled "GetUpperConstraintFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)"

Gets the upper constraint formula used to validate the cell value.

public string GetUpperConstraintFormula(string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture)

Parameters

  • address: string
  • format: WorkbookFormat
  • cellReferenceMode: CellReferenceMode
  • culture: CultureInfo

Returns any

Indicates if this rule is structurally equivalent to another.

public override bool IsEquivalentTo(DataValidationRule other)

Parameters

  • other: DataValidationRule

Returns any

Sets the lower constraint value used to validate the cell value.

public void SetLowerConstraint(DateTime value)

Parameters

  • value: DateTime

Returns any

Sets the lower constraint value used to validate the cell value.

public void SetLowerConstraint(double value)

Parameters

  • value: double

Returns any

Sets the lower constraint value used to validate the cell value.

public void SetLowerConstraint(TimeSpan value)

Parameters

  • value: TimeSpan

Returns any

SetLowerConstraintFormula(string, string)

Section titled "SetLowerConstraintFormula(string, string)"

Gets the lower constraint formula used to validate the cell value.

public void SetLowerConstraintFormula(string lowerConstraintFormula, string address)

Parameters

  • lowerConstraintFormula: string
  • address: string

Returns any

SetLowerConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)

Section titled "SetLowerConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)"

Gets the lower constraint formula used to validate the cell value.

public void SetLowerConstraintFormula(string lowerConstraintFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture)

Parameters

  • lowerConstraintFormula: string
  • address: string
  • format: WorkbookFormat
  • cellReferenceMode: CellReferenceMode
  • culture: CultureInfo

Returns any

Sets the upper constraint value used to validate the cell value.

public void SetUpperConstraint(DateTime value)

Parameters

  • value: DateTime

Returns any

Sets the upper constraint value used to validate the cell value.

public void SetUpperConstraint(double value)

Parameters

  • value: double

Returns any

Sets the upper constraint value used to validate the cell value.

public void SetUpperConstraint(TimeSpan value)

Parameters

  • value: TimeSpan

Returns any

SetUpperConstraintFormula(string, string)

Section titled "SetUpperConstraintFormula(string, string)"

Gets the upper constraint formula used to validate the cell value.

public void SetUpperConstraintFormula(string upperConstraintFormula, string address)

Parameters

  • upperConstraintFormula: string
  • address: string

Returns any

SetUpperConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)

Section titled "SetUpperConstraintFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)"

Gets the upper constraint formula used to validate the cell value.

public void SetUpperConstraintFormula(string upperConstraintFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture)

Parameters

  • upperConstraintFormula: string
  • address: string
  • format: WorkbookFormat
  • cellReferenceMode: CellReferenceMode
  • culture: CultureInfo

Returns any

TryGetLowerConstraint(out DateTime)

Section titled "TryGetLowerConstraint(out DateTime)"

Tries to obtain the value of the lower constraint.

public bool TryGetLowerConstraint(out DateTime value)

Parameters

  • value: DateTime

Returns any

Tries to obtain the value of the lower constraint.

public bool TryGetLowerConstraint(out double value)

Parameters

  • value: double

Returns any

TryGetLowerConstraint(out TimeSpan)

Section titled "TryGetLowerConstraint(out TimeSpan)"

Tries to obtain the value of the lower constraint.

public bool TryGetLowerConstraint(out TimeSpan value)

Parameters

  • value: TimeSpan

Returns any

TryGetUpperConstraint(out DateTime)

Section titled "TryGetUpperConstraint(out DateTime)"

Tries to obtain the value of the upper constraint.

public bool TryGetUpperConstraint(out DateTime value)

Parameters

  • value: DateTime

Returns any

Tries to obtain the value of the upper constraint.

public bool TryGetUpperConstraint(out double value)

Parameters

  • value: double

Returns any

TryGetUpperConstraint(out TimeSpan)

Section titled "TryGetUpperConstraint(out TimeSpan)"

Tries to obtain the value of the upper constraint.

public bool TryGetUpperConstraint(out TimeSpan value)

Parameters

  • value: TimeSpan

Returns any