ig.excel.TwoConstraintDataValidationRule
Dependencies
-
ig.excel.TwoConstraintDataValidationRule
Constructor- new $.ig.excel.TwoConstraintDataValidationRule( );
Creates a new TwoConstraintDataValidationRule instance.
-
ig.excel.TwoConstraintDataValidationRule
Constructor- new $.ig.excel.TwoConstraintDataValidationRule( validationOperator:ig.excel.TwoConstraintDataValidationOperator, validationCriteria:ig.excel.DataValidationCriteria );
Creates a new TwoConstraintDataValidationRule instance.
- validationOperator
- Type:ig.excel.TwoConstraintDataValidationOperator
- The operator to use when comparing the cell value to the constraint values.
- 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. -
getLowerConstraintFormula
- .getLowerConstraintFormula( address:string );
- Return Type:
- string
- Return Type Description:
- A formula used to validate the value applied to a cell.
Gets the lower 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 lower constraint formula's value is determined by the TwoConstraintDataValidationRule.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 lower constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
getLowerConstraintFormula
- .getLowerConstraintFormula( 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 lower 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 lower constraint formula's value is determined by the TwoConstraintDataValidationRule.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 lower constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
getUpperConstraintFormula
- .getUpperConstraintFormula( address:string );
- Return Type:
- string
- Return Type Description:
- A formula used to validate the value applied to a cell.
Gets the upper 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 upper constraint formula's value is determined by the TwoConstraintDataValidationRule.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 upper constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
getUpperConstraintFormula
- .getUpperConstraintFormula( 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 upper 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 upper constraint formula's value is determined by the TwoConstraintDataValidationRule.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 upper constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
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
-
setLowerConstraint
- .setLowerConstraint( value:ig.Date );
Sets the lower constraint value used to validate the cell value.
- value
- Type:ig.Date
- The lower 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. ig.ArgumentException Occurs when the specified value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. Remarks
The way in which the cell value is compared to the lower constraint value is determined by the TwoConstraintDataValidationRule.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 lower constraint value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
This overload is preferred when the ValidationCriteria is Date. When the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength, the TwoConstraintDataValidationRule.setLowerConstraint overload is preferred.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setLowerConstraint
- .setLowerConstraint( value:number );
Sets the lower constraint value used to validate the cell value.
- value
- Type:number
- The lower constraint value used to compare against the cell value.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. Remarks
The way in which the cell value is compared to the lower constraint value is determined by the TwoConstraintDataValidationRule.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 lower constraint value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
This overload is preferred when the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength. When the ValidationCriteria is Date, the TwoConstraintDataValidationRule.setLowerConstraint overload is preferred.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setLowerConstraintFormula
- .setLowerConstraintFormula( lowerConstraintFormula:string, address:string );
Gets the lower constraint formula used to validate the cell value.
- lowerConstraintFormula
- Type:string
- The lower constraint 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 lowerConstraintFormula is null and the rule is currently applied to a Worksheet. ig.ArgumentNullException Occurs when the specified value is null and the rule is currently applied to a Worksheet. ig.ArgumentException Occurs when lowerConstraintFormula is an ArrayFormula. ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.ArgumentException Occurs when the specified value equals a constant, such as =5, and the constant value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. ig.excel.FormulaParseException Occurs when lowerConstraintFormula is not a valid formula. Remarks
The way in which the cell value is compared to the lower constraint formula's value is determined by the TwoConstraintDataValidationRule.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 lower constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setLowerConstraintFormula
- .setLowerConstraintFormula( lowerConstraintFormula:string, address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );
Gets the lower constraint formula used to validate the cell value.
- lowerConstraintFormula
- Type:string
- The lower constraint 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 lowerConstraintFormula is null and the rule is currently applied to a Worksheet. ig.ArgumentNullException Occurs when the specified value is null and the rule is currently applied to a Worksheet. ig.ArgumentException Occurs when lowerConstraintFormula is an ArrayFormula. ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.ArgumentException Occurs when the specified value equals a constant, such as =5, and the constant value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. ig.excel.FormulaParseException Occurs when lowerConstraintFormula is not a valid formula. 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 lower constraint formula's value is determined by the TwoConstraintDataValidationRule.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 lower constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setUpperConstraint
- .setUpperConstraint( value:ig.Date );
Sets the upper constraint value used to validate the cell value.
- value
- Type:ig.Date
- The lower 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. ig.ArgumentException Occurs when the specified value is less than the lower constraint value. If the lower constraint formula does not equal a constant, this verification is not performed. Remarks
The way in which the cell value is compared to the upper constraint value is determined by the TwoConstraintDataValidationRule.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 upper constraint value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
This overload is preferred when the ValidationCriteria is Date. When the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength, the TwoConstraintDataValidationRule.setUpperConstraint overload is preferred.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setUpperConstraint
- .setUpperConstraint( value:number );
Sets the upper constraint value used to validate the cell value.
- value
- Type:number
- The lower constraint value used to compare against the cell value.
Exceptions
Exception Description ig.ArgumentException Occurs when the specified value is less than the lower constraint value. If the lower constraint formula does not equal a constant, this verification is not performed. Remarks
The way in which the cell value is compared to the upper constraint value is determined by the TwoConstraintDataValidationRule.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 upper constraint value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
This overload is preferred when the ValidationCriteria is WholeNumber, Decimal, Time, or TextLength. When the ValidationCriteria is Date, the TwoConstraintDataValidationRule.setUpperConstraint overload is preferred.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setUpperConstraintFormula
- .setUpperConstraintFormula( upperConstraintFormula:string, address:string );
Gets the upper constraint formula used to validate the cell value.
- upperConstraintFormula
- Type:string
- The upper constraint 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 upperConstraintFormula is null and the rule is currently applied to a Worksheet. ig.ArgumentNullException Occurs when the specified value is null and the rule is currently applied to a Worksheet. ig.ArgumentException Occurs when upperConstraintFormula is an ArrayFormula. ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.ArgumentException Occurs when the specified value equals a constant, such as =5, and the constant value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. ig.excel.FormulaParseException Occurs when upperConstraintFormula is not a valid formula. Remarks
The way in which the cell value is compared to the upper constraint formula's value is determined by the TwoConstraintDataValidationRule.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 upper constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
setUpperConstraintFormula
- .setUpperConstraintFormula( upperConstraintFormula:string, address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );
Gets the upper constraint formula used to validate the cell value.
- upperConstraintFormula
- Type:string
- The upper constraint 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 upperConstraintFormula is null and the rule is currently applied to a Worksheet. ig.ArgumentNullException Occurs when the specified value is null and the rule is currently applied to a Worksheet. ig.ArgumentException Occurs when upperConstraintFormula is an ArrayFormula. ig.ArgumentException Occurs when address is not a valid cell or regions address. ig.ArgumentException Occurs when the specified value equals a constant, such as =5, and the constant value is greater than the upper constraint value. If the upper constraint formula does not equal a constant, this verification is not performed. ig.excel.FormulaParseException Occurs when upperConstraintFormula is not a valid formula. 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 upper constraint formula's value is determined by the TwoConstraintDataValidationRule.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 upper constraint formula's value.
When the TwoConstraintDataValidationRule.validationOperator is Between, the value must be greater than or equal to the lower constraint and less than or equal to the upper constraint. When the ValidationOperator is NotBetween, the value must be less than the lower constraint or greater than the upper constraint.
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.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.validationOperator
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
validationOperator
- .validationOperator( );
Gets the validation operator to use when comparing the cell value against the constraint values or formulas.
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the TwoConstraintDataValidationOperator 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 values or formulas.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.ValueConstraintDataValidationRule.validationCriteria
-
validationOperator
- .validationOperator( value:ig.excel.TwoConstraintDataValidationOperator );
Sets the validation operator to use when comparing the cell value against the constraint values or formulas.
- value
- Type:ig.excel.TwoConstraintDataValidationOperator
Exceptions
Exception Description ig.excel.InvalidEnumArgumentException Occurs when the value is not a member of the TwoConstraintDataValidationOperator 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 values or formulas.
See Also
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraint
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.getUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setLowerConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.TwoConstraintDataValidationRule.setUpperConstraintFormula
- ig.excel.ValueConstraintDataValidationRule.validationCriteria