跳到主要内容

ApiValidation

Represents the ApiValidation class.

Properties

NameTypeDescription
AlertStyleValidationAlertStyleReturns the validation alert style.
ErrorMessagestringReturns or sets the data validation error message.
ErrorTitlestringReturns or sets the title of the data-validation error dialog box.
Formula1stringReturns the value or expression associated with the conditional format or data validation.
Formula2stringReturns the value or expression associated with the second part of a conditional format or data validation.
IgnoreBlankbooleanReturns or sets a Boolean value that specifies whether blank values are permitted by the range data validation.
InCellDropdownbooleanReturns or sets a Boolean value indicating whether data validation displays a drop-down list that contains acceptable values.
InputMessagestringReturns or sets the data validation input message.
InputTitlestringReturns or sets the title of the data-validation input dialog box.
OperatorValidationOperatorReturns the data validation operator.
ParentApiRangeReturns the parent range object.
ShowErrorbooleanReturns or sets a Boolean value indicating whether the data validation error message will be displayed whenever the user enters invalid data.
ShowInputbooleanReturns or sets a Boolean value indicating whether the data validation input message will be displayed whenever the user selects a cell in the data validation range.
TypeValidationTypeReturns the validation type.
ValuestringReturns the validation value.

Methods

MethodReturnsDescription
AddApiValidation | nullAdds data validation to the specified range.
DeleteNoneDeletes the object.
GetAlertStyleValidationAlertStyleReturns the validation alert style.
GetErrorMessagestringReturns the data validation error message.
GetErrorTitlestringReturns the title of the data-validation error dialog box.
GetFormula1stringReturns the first formula in the data validation.
GetFormula2stringReturns the second formula in the data validation.
GetIgnoreBlankbooleanReturns whether blank values are permitted by the range data validation.
GetInCellDropdownbooleanReturns whether data validation displays a drop-down list that contains acceptable values.
GetInputMessagestringReturns the data validation input message.
GetInputTitlestringReturns the title of the data-validation input dialog box.
GetOperatorValidationOperatorReturns the data validation operator.
GetParentApiRangeReturns the parent range object.
GetShowErrorbooleanReturns whether the data validation error message will be displayed.
GetShowInputbooleanReturns whether the data validation input message will be displayed.
GetTypeValidationTypeReturns the validation type.
ModifyApiValidation | nullModifies data validation for a range.
SetErrorMessageNoneSets the data validation error message.
SetErrorTitleNoneSets the title of the data-validation error dialog box.
SetIgnoreBlankNoneSets whether blank values are permitted by the range data validation.
SetInCellDropdownNoneSets whether data validation displays a drop-down list that contains acceptable values.
SetInputMessageNoneSets the data validation input message.
SetInputTitleNoneSets the title of the data-validation input dialog box.
SetShowErrorNoneSets whether the data validation error message will be displayed.
SetShowInputNoneSets whether the data validation input message will be displayed.