DataValidation

Overview

DataValidation is a class in Aspose.Cells FOSS for Python.

Represents data validation settings for a range of cells.

This class provides 5 methods for working with DataValidation objects in Python programs. Available methods include: __init__, add, copy, delete, modify. All public members are accessible to any Python application after installing the Aspose.Cells FOSS for Python package. Properties: alert_style, allow_blank, error, error_message, error_title, formula1, and 17 more.

Properties

NameTypeAccessDescription
sqref``Read/WriteGets or sets the cell range(s) for this validation.
ranges``ReadGets the cell range(s) as a list.
type``Read/WriteGets or sets the validation type.
operator``Read/WriteGets or sets the comparison operator.
formula1``Read/WriteGets or sets the first formula for validation.
formula2``Read/WriteGets or sets the second formula for validation.
alert_style``Read/WriteGets or sets the style of the error alert.
show_error_message``Read/WriteGets or sets whether to show the error alert when invalid data is entered.
show_error``Read/WriteAlias for show_error_message (Excel VBA compatibility).
error_title``Read/WriteGets or sets the title of the error alert dialog.
error_message``Read/WriteGets or sets the error message displayed when invalid data is entered.
error``Read/WriteAlias for error_message (ECMA-376 compatibility).
show_input_message``Read/WriteGets or sets whether to show the input message when the cell is selected.
show_input``Read/WriteAlias for show_input_message (Excel VBA compatibility).
input_title``Read/WriteGets or sets the title of the input message dialog.
prompt_title``Read/WriteAlias for input_title (ECMA-376 compatibility).
input_message``Read/WriteGets or sets the input message displayed when the cell is selected.
prompt``Read/WriteAlias for input_message (ECMA-376 compatibility).
allow_blank``Read/WriteGets or sets whether blank/empty entries are valid.
ignore_blank``Read/WriteAlias for allow_blank (Excel VBA compatibility).
show_dropdown``Read/WriteGets or sets whether to show the dropdown arrow for list validation.
in_cell_dropdown``Read/WriteAlias for show_dropdown (Excel VBA compatibility).
ime_mode``Read/WriteGets or sets the IME (Input Method Editor) mode.

Methods

SignatureDescription
__init__(sqref)Initializes a new DataValidation instance.
add(validation_type, alert_style, operator, formula1, formula2)Configures the data validation with the specified parameters.
modify(validation_type, alert_style, operator, formula1, formula2)Modifies the data validation settings.
delete()Clears the validation settings (resets to no validation).
copy()Creates a copy of this DataValidation.

See Also