Represents a data validation rule which allows a value from a list of accepted values to be applied to a cell.

constructor

public ListDataValidationRule()

Returns ListDataValidationRule

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 value which indicates whether a drop down should be displayed in Microsoft Excel with the list of accepted values.

public bool ShowDropdown { 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 formula which specifies the accepted values.

public string GetValuesFormula(string address)

Parameters

  • address: string

Returns any

GetValuesFormula(string, WorkbookFormat, CellReferenceMode, CultureInfo)

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

Gets the formula which specifies the accepted values.

public string GetValuesFormula(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 list of accepted values the cell can accept.

public void SetValues(params object[] values)

Parameters

  • values: object[]

Returns any

Sets the formula which specifies the accepted values.

public void SetValuesFormula(string valuesFormula, string address)

Parameters

  • valuesFormula: string
  • address: string

Returns any

SetValuesFormula(string, string, WorkbookFormat, CellReferenceMode, CultureInfo)

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

Sets the formula which specifies the accepted values.

public void SetValuesFormula(string valuesFormula, string address, WorkbookFormat format, CellReferenceMode cellReferenceMode, CultureInfo culture)

Parameters

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

Returns any

Tries to obtain the value of the constraint.

public bool TryGetValues(out object[] values)

Parameters

  • values: object[]

Returns any