[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

dataValidation (Data Validation)

A single item of data validation defined on a range of the worksheet.

Parent Elements

dataValidations3.3.1.31)

 

Child Elements

Subclause

formula1 (Formula 1)

§3.3.1.41

formula2 (Formula 2)

§3.3.1.42

 

Attributes

Description

allowBlank (Allow Blank)

A boolean value indicating whether the data validation treats empty or blank entries as valid. '1' means empty entries are OK and do not violate the validation constraints.

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

error (Error Message)

Message text of error alert.

 

The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96).

errorStyle (Data Validation Error Style)

The style of error alert used for this data validation.

 

The possible values for this attribute are defined by the ST_DataValidationErrorStyle simple type (§3.18.19).

errorTitle (Error Alert Text)

Title bar text of error alert.

 

The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96).

imeMode (IME Mode Enforced)

The IME (input method editor) mode enforced by this data validation. Only applies for these languages:

Chinese Simplified

Chinese Traditional

Japanese

Korean

When imeMode is set, the input for the cell can be restricted to specific sets of characters, as specified by the value of imeMode. See the simple type referenced below for additional details.

When imeMode is set but the application's language is not one of the languages listed above, then the default value is noControl.

 

The possible values for this attribute are defined by the ST_DataValidationImeMode simple type (§3.18.20).

operator (Operator)

The relational operator used with this data validation.

 

The possible values for this attribute are defined by the ST_DataValidationOperator simple type (§3.18.21).

prompt (Input Prompt)

Message text of input prompt.

 

The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96).

promptTitle (Prompt Title)

Title bar text of input prompt.

 

The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96).

showDropDown (Show Drop Down)

A boolean value indicating whether to display the dropdown combo box for a list type data validation.

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

showErrorMessage (Show Error Message)

A boolean value indicating whether to display the error alert message when an invalid value has been entered, according to the criteria specified.

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

showInputMessage (Show Input Message)

A boolean value indicating whether to display the input prompt message.

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

sqref (Sequence of References)

Range over which data validation is applied.

 

The possible values for this attribute are defined by the ST_Sqref simple type (§3.18.78).

type (Data Validation Type)

The type of data validation.

 

The possible values for this attribute are defined by the ST_DataValidationType simple type (§3.18.22).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_DataValidation">

   <sequence>

   <element name="formula1" type="ST_Formula" minOccurs="0" maxOccurs="1"/>

   <element name="formula2" type="ST_Formula" minOccurs="0" maxOccurs="1"/>

   </sequence>

   <attribute name="type" type="ST_DataValidationType" use="optional" default="none"/>

   <attribute name="errorStyle" type="ST_DataValidationErrorStyle" use="optional" default="stop"/>

   <attribute name="imeMode" type="ST_DataValidationImeMode" use="optional" default="noControl"/>

   <attribute name="operator" type="ST_DataValidationOperator" use="optional" default="between"/>

   <attribute name="allowBlank" type="xsd:boolean" use="optional" default="false"/>

   <attribute name="showDropDown" type="xsd:boolean" use="optional" default="false"/>

   <attribute name="showInputMessage" type="xsd:boolean" use="optional" default="false"/>

   <attribute name="showErrorMessage" type="xsd:boolean" use="optional" default="false"/>

   <attribute name="errorTitle" type="ST_Xstring" use="optional"/>

   <attribute name="error" type="ST_Xstring" use="optional"/>

   <attribute name="promptTitle" type="ST_Xstring" use="optional"/>

   <attribute name="prompt" type="ST_Xstring" use="optional"/>

   <attribute name="sqref" type="ST_Sqref" use="required"/>

</complexType>