ig.excel.OneConstraintDataValidationRule
Dependencies
-
ig.excel.OneConstraintDataValidationRule
Constructor- new $.ig.excel.OneConstraintDataValidationRule( );
Creates a new OneConstraintDataValidationRule instance.
-
ig.excel.OneConstraintDataValidationRule
Constructor- new $.ig.excel.OneConstraintDataValidationRule( validationOperator:ig.excel.OneConstraintDataValidationOperator, validationCriteria:ig.excel.DataValidationCriteria );
Creates a new OneConstraintDataValidationRule instance.
- validationOperator
- Type:ig.excel.OneConstraintDataValidationOperator
- The operator to use when comparing the cell value to the constraint value.
- validationCriteria
- Type:ig.excel.DataValidationCriteria
- The criteria to use when validating the cell value.
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the validationCriteria is not a member of the DataValidationCriteria enumeration. -
allowNull
Inherited- .allowNull( );
- Return Type:
- boolean
- Return Type Description:
- True if a null value can be set on the cell; False otherwise.
Gets the value which indicates whether a null, or blank, value is allowed to be set on a cell.
-
allowNull
Inherited- .allowNull( value:boolean );
- Return Type:
- boolean
- Return Type Description:
- True if a null value can be set on the cell; False otherwise.
Sets the value which indicates whether a null, or blank, value is allowed to be set on a cell.
- value
- Type:boolean
-
clone
Inherited- .clone( );
Creates a copy of this rule which can be applied to other worksheets.
See Also
-
errorMessageDescription
Inherited- .errorMessageDescription( );
- Return Type:
- string
- Return Type Description:
- The description to show the user or null to use a default error description.
Gets the description which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 225 characters. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
Note: the title cannot be more than 225 characters.
-
errorMessageDescription
Inherited- .errorMessageDescription( value:string );
- Return Type:
- string
- Return Type Description:
- The description to show the user or null to use a default error description.
Sets the description which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
- value
- Type:string
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 225 characters. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
Note: the title cannot be more than 225 characters.
-
errorMessageTitle
Inherited- .errorMessageTitle( );
- Return Type:
- string
- Return Type Description:
- The title to show the user or null to use a default error dialog title.
Gets the title which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 32 characters. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
Note: the title cannot be more than 32 characters.
-
errorMessageTitle
Inherited- .errorMessageTitle( value:string );
- Return Type:
- string
- Return Type Description:
- The title to show the user or null to use a default error dialog title.
Sets the title which appears in the dialog box when an invalid value is applied to a cell in Microsoft Excel.
- value
- Type:string
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 32 characters. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
Note: the title cannot be more than 32 characters.
-
errorStyle
Inherited- .errorStyle( );
- Return Type:
- ig.excel.DataValidationErrorStyle
- Return Type Description:
- Returns a DataValidationErrorStyle.
Gets 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.
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationErrorStyle enumeration. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
-
errorStyle
Inherited- .errorStyle( value:ig.excel.DataValidationErrorStyle );
- Return Type:
- ig.excel.DataValidationErrorStyle
- Return Type Description:
- Returns a DataValidationErrorStyle.
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.
- value
- Type:ig.excel.DataValidationErrorStyle
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationErrorStyle enumeration. Remarks
This value is only used when DataValidationRule.showErrorMessageForInvalidValue is True.
-
getConstraintFormula
- .getConstraintFormula( address:string );
- Return Type:
- string
- Return Type Description:
- A formula used to validate the value applied to a cell.
Gets the constraint formula used to validate the cell value.
- address
- Type:string
- The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
Exceptions
Exception Description ig.ArgumentException Occurs when address is not a valid cell or regions address. Remarks
The way in which the cell value is compared to the constraint formula's value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint formula's value.
The address passed in is only needed if relative addresses are used in the the formula. For example, consider the formula applied is =B1, and the data validation rule is applied to the region A1:A5. If you get the formula for A1, the formula =B1 will be returned. If you get the formula for A2, =B2 will be returned. Similarly, for cell A5, =B5 will be returned. However, if the formula contains no references or all absolute references, the address is ignored. So in the previous example, if the original formula was =$B$1, the same formula will be returned regardless of the specified address.
address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.
The cell reference mode with which to parse address will be assumed to be A1, unless the data validation rule is applied to a worksheet which is in a workbook, in which case the Workbook.cellReferenceMode will be used.
See Also
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
-
getConstraintFormula
- .getConstraintFormula( address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );
- Return Type:
- string
- Return Type Description:
- A formula used to validate the value applied to a cell.
Gets the constraint formula used to validate the cell value.
- address
- Type:string
- The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
- format
- Type:ig.excel.WorkbookFormat
- The workbook format with which to parse address.
- cellReferenceMode
- Type:ig.excel.CellReferenceMode
- The cell reference mode with which to parse address.
- culture
- Type:string
- The culture to use when generating the formula string.
Exceptions
Exception Description ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.excel.InvalidEnumArgumentException Occurs when format is not defined in the WorkbookFormat enumeration. ig.excel.InvalidEnumArgumentException Occurs when cellReferenceMode is not defined in the CellReferenceMode enumeration. Remarks
The way in which the cell value is compared to the constraint formula's value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint formula's value.
The address passed in is only needed if relative addresses are used in the the formula. For example, consider the formula applied is =B1, and the data validation rule is applied to the region A1:A5. If you get the formula for A1, the formula =B1 will be returned. If you get the formula for A2, =B2 will be returned. Similarly, for cell A5, =B5 will be returned. However, if the formula contains no references or all absolute references, the address is ignored. So in the previous example, if the original formula was =$B$1, the same formula will be returned regardless of the specified address.
address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.
See Also
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.WorkbookFormat
- ig.excel.CellReferenceMode
-
imeMode
Inherited- .imeMode( );
- Return Type:
- ig.excel.DataValidationImeMode
- Return Type Description:
- Returns a DataValidationImeMode.
Gets the description of the Japanese input rules.
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationImeMode enumeration. See Also
-
imeMode
Inherited- .imeMode( value:ig.excel.DataValidationImeMode );
- Return Type:
- ig.excel.DataValidationImeMode
- Return Type Description:
- Returns a DataValidationImeMode.
Sets the description of the Japanese input rules.
- value
- Type:ig.excel.DataValidationImeMode
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationImeMode enumeration. See Also
-
inputMessageDescription
Inherited- .inputMessageDescription( );
- Return Type:
- string
- Return Type Description:
- The description to show the user in the tooltip.
Gets the description in the tooltip which appears when the user selects the cell in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 255 characters. Remarks
This value is only used when DataValidationRule.showInputMessage is True.
Note: the description cannot be more than 255 characters.
-
inputMessageDescription
Inherited- .inputMessageDescription( value:string );
- Return Type:
- string
- Return Type Description:
- The description to show the user in the tooltip.
Sets the description in the tooltip which appears when the user selects the cell in Microsoft Excel.
- value
- Type:string
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 255 characters. Remarks
This value is only used when DataValidationRule.showInputMessage is True.
Note: the description cannot be more than 255 characters.
-
inputMessageTitle
Inherited- .inputMessageTitle( );
- Return Type:
- string
- Return Type Description:
- The title to show the user in the tooltip.
Gets the title in the tooltip which appears when the user selects the cell in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 32 characters. Remarks
This value is only used when DataValidationRule.showInputMessage is True.
Note: the title cannot be more than 32 characters.
-
inputMessageTitle
Inherited- .inputMessageTitle( value:string );
- Return Type:
- string
- Return Type Description:
- The title to show the user in the tooltip.
Sets the title in the tooltip which appears when the user selects the cell in Microsoft Excel.
- value
- Type:string
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is longer than 32 characters. Remarks
This value is only used when DataValidationRule.showInputMessage is True.
Note: the title cannot be more than 32 characters.
-
isEquivalentTo
- .isEquivalentTo( other:ig.excel.DataValidationRule );
- Return Type:
- boolean
- Return Type Description:
- Returns true if the specified other has the same settings as this rule.
Indicates if this rule is structurally equivalent to another.
- other
- Type:ig.excel.DataValidationRule
- The rule to compare against
See Also
-
setConstraint
- .setConstraint( value:ig.Date );
Sets the constraint value used to validate the cell value.
- value
- Type:ig.Date
- The constraint value used to compare against the cell value.
Exceptions
Exception Description ig.ArgumentException Occurs when value cannot be represented as a date in Excel. Remarks
The way in which the cell value is compared to the constraint value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint value.
This overload is preferred when the ValidationCriteria is Date. When the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength, the OneConstraintDataValidationRule.setConstraint overload is preferred.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setConstraint
- .setConstraint( value:number );
Sets the constraint value used to validate the cell value.
- value
- Type:number
- The constraint value used to compare against the cell value.
Remarks
The way in which the cell value is compared to the constraint value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint value.
This overload is preferred when the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength. When the ValidationCriteria is Date, the OneConstraintDataValidationRule.setConstraint overload is preferred.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setConstraintFormula
- .setConstraintFormula( constraintFormula:string, address:string );
Sets the constraint formula used to validate the cell value.
- constraintFormula
- Type:string
- The validation formula to use for the rule.
- address
- Type:string
- The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
Exceptions
Exception Description ig.ArgumentNullException Occurs when constraintFormula is null and the rule is currently applied to a Worksheet. ig.excel.FormulaParseException Occurs when constraintFormula is not a valid formula. ig.ArgumentException Occurs when address is not a valid cell or regions address. Remarks
The way in which the cell value is compared to the constraint formula's value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint formula's value.
The address passed in is only needed if relative addresses are used in the the formula. When the data validation rule is applied to cells or regions, the references in the formula used by each individual cell will be shifted by the offset of the cell to the passed in address. For example, consider the formula specified is =B1 and the specified address is A1. If the data validation rule is then applied to the A5 cell, the formula is will use is =B5. However, if the references in the formula are absolute, such as =$B$1, the same formula will be applied regardless of the specified address.
address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.
The cell reference mode with which to parse address will be assumed to be A1, unless the data validation rule is applied to a worksheet which is in a workbook, in which case the Workbook.cellReferenceMode will be used.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
-
setConstraintFormula
- .setConstraintFormula( constraintFormula:string, address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );
Sets the constraint formula used to validate the cell value.
- constraintFormula
- Type:string
- The validation formula to use for the rule.
- address
- Type:string
- The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
- format
- Type:ig.excel.WorkbookFormat
- The workbook format with which to parse address.
- cellReferenceMode
- Type:ig.excel.CellReferenceMode
- The cell reference mode with which to parse address.
- culture
- Type:string
- The culture to use when parsing the formula string.
Exceptions
Exception Description ig.ArgumentNullException Occurs when constraintFormula is null and the rule is currently applied to a Worksheet. ig.excel.FormulaParseException Occurs when constraintFormula is not a valid formula. ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.excel.InvalidEnumArgumentException Occurs when format is not defined in the WorkbookFormat enumeration. ig.excel.InvalidEnumArgumentException Occurs when cellReferenceMode is not defined in the CellReferenceMode enumeration. Remarks
The way in which the cell value is compared to the constraint formula's value is determined by the OneConstraintDataValidationRule.validationOperator as well as the ValueConstraintDataValidationRule.validationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint formula's value.
The address passed in is only needed if relative addresses are used in the the formula. When the data validation rule is applied to cells or regions, the references in the formula used by each individual cell will be shifted by the offset of the cell to the passed in address. For example, consider the formula specified is =B1 and the specified address is A1. If the data validation rule is then applied to the A5 cell, the formula is will use is =B5. However, if the references in the formula are absolute, such as =$B$1, the same formula will be applied regardless of the specified address.
address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.WorkbookFormat
- ig.excel.CellReferenceMode
-
showErrorMessageForInvalidValue
Inherited- .showErrorMessageForInvalidValue( );
- Return Type:
- boolean
- Return Type Description:
- True to show the error dialog for invalid cell data; False otherwise.
Gets the value which indicates whether the error dialog should appear in Microsoft Excel when invalid data is entered in the cell.
Remarks
When the value is False, invalid data can be entered into cells, but when the user chooses to subsequently circle invalid values in Microsoft Excel, the cell will be circled.
-
showErrorMessageForInvalidValue
Inherited- .showErrorMessageForInvalidValue( value:boolean );
- Return Type:
- boolean
- Return Type Description:
- True to show the error dialog for invalid cell data; False otherwise.
Sets the value which indicates whether the error dialog should appear in Microsoft Excel when invalid data is entered in the cell.
- value
- Type:boolean
Remarks
When the value is False, invalid data can be entered into cells, but when the user chooses to subsequently circle invalid values in Microsoft Excel, the cell will be circled.
-
showInputMessage
Inherited- .showInputMessage( );
Gets the value which indicates whether to show the user an input prompt tooltip when the user selects the cell in Microsoft Excel.
Remarks
The input prompt will only be shown if this value is True and the DataValidationRule.inputMessageDescription is not null.
-
showInputMessage
Inherited- .showInputMessage( value:boolean );
Sets the value which indicates whether to show the user an input prompt tooltip when the user selects the cell in Microsoft Excel.
- value
- Type:boolean
Remarks
The input prompt will only be shown if this value is True and the DataValidationRule.inputMessageDescription is not null.
-
validationCriteria
Inherited- .validationCriteria( );
- Return Type:
- ig.excel.DataValidationCriteria
- Return Type Description:
- Returns a DataValidationCriteria.
Gets the criteria to use when validating the cell value against the constraint(s).
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationCriteria enumeration. Remarks
Depending on the value specified, either then cell value or the length of its text equivalent will be compared against the constraint(s). In addition, certain ValidationCriteria values may disallow a cell value even if it is valid when compared to the constraint. For example, the ValidationCriteria.WholeNumber value will not allow any number with a fractional portion.
See Also
-
validationCriteria
Inherited- .validationCriteria( value:ig.excel.DataValidationCriteria );
- Return Type:
- ig.excel.DataValidationCriteria
- Return Type Description:
- Returns a DataValidationCriteria.
Sets the criteria to use when validating the cell value against the constraint(s).
- value
- Type:ig.excel.DataValidationCriteria
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the DataValidationCriteria enumeration. Remarks
Depending on the value specified, either then cell value or the length of its text equivalent will be compared against the constraint(s). In addition, certain ValidationCriteria values may disallow a cell value even if it is valid when compared to the constraint. For example, the ValidationCriteria.WholeNumber value will not allow any number with a fractional portion.
See Also
-
validationOperator
- .validationOperator( );
- Return Type:
- ig.excel.OneConstraintDataValidationOperator
- Return Type Description:
- Returns a OneConstraintDataValidationOperator.
Gets the validation operator to use when comparing the cell value against the constraint value or formula.
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the OneConstraintDataValidationOperator enumeration. Remarks
Depending on the ValueConstraintDataValidationRule.validationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint value or formula.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationOperator
-
validationOperator
- .validationOperator( value:ig.excel.OneConstraintDataValidationOperator );
- Return Type:
- ig.excel.OneConstraintDataValidationOperator
- Return Type Description:
- Returns a OneConstraintDataValidationOperator.
Sets the validation operator to use when comparing the cell value against the constraint value or formula.
- value
- Type:ig.excel.OneConstraintDataValidationOperator
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the OneConstraintDataValidationOperator enumeration. Remarks
Depending on the ValueConstraintDataValidationRule.validationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint value or formula.
See Also
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.setConstraint
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.getConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.OneConstraintDataValidationRule.setConstraintFormula
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
- ig.excel.OneConstraintDataValidationOperator