Edit

Share via


Excel.Interfaces.DataValidationData interface

An interface describing the data returned by calling dataValidation.toJSON().

Properties

errorAlert

Error alert when user enters invalid data.

ignoreBlanks

Specifies if data validation will be performed on blank cells. Default is true.

prompt

Prompt when users select a cell.

rule

Data validation rule that contains different type of data validation criteria.

type

Type of the data validation, see Excel.DataValidationType for details.

valid

Represents if all cell values are valid according to the data validation rules. Returns true if all cell values are valid, or false if all cell values are invalid. Returns null if there are both valid and invalid cell values within the range.

Property Details

errorAlert

Error alert when user enters invalid data.

TypeScript
errorAlert?: Excel.DataValidationErrorAlert;

Property Value

Remarks

[ API set: ExcelApi 1.8 ]

ignoreBlanks

Specifies if data validation will be performed on blank cells. Default is true.

TypeScript
ignoreBlanks?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.8 ]

prompt

Prompt when users select a cell.

TypeScript
prompt?: Excel.DataValidationPrompt;

Property Value

Remarks

[ API set: ExcelApi 1.8 ]

rule

Data validation rule that contains different type of data validation criteria.

TypeScript
rule?: Excel.DataValidationRule;

Property Value

Remarks

[ API set: ExcelApi 1.8 ]

type

Type of the data validation, see Excel.DataValidationType for details.

TypeScript
type?: Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria";

Property Value

Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"

Remarks

[ API set: ExcelApi 1.8 ]

valid

Represents if all cell values are valid according to the data validation rules. Returns true if all cell values are valid, or false if all cell values are invalid. Returns null if there are both valid and invalid cell values within the range.

TypeScript
valid?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.8 ]