GetValidationValue using the NotBetween operator returns false for valid validations.
Can you please take a look?
List of Allow and Notbetween operator that give incorrect values
Cell: C2
Allow: Whole number
Data: not between
Minimum: 1
Maximum 10
Value: 11
Actual: false
Expected: true
Cell: C3
Allow: Decimal
Data: not between
Minimum: -1000
Maximum 1000
Value: 1001
Actual: false
Expected: true
Cell: C4
Allow: Date
Data: not between
Minimum: 1-1-2020
Maximum 31-12-2020
Value: 15-3-1993
Actual: false
Expected: true
Cell: C5
Allow: Time
Data: not between
Minimum: 9:00:00
Maximum 17:00:00
Value: 18:30:00
Actual: false
Expected: true
Cell: C6
Allow: Text length
Data: not between
Minimum: 0
Maximum: 6
Value: abcdefg
Actual: false
Expected: true
Example code
var workbook = new Workbook(@"Data validation Not between.xlsx");
Worksheet sheet1 = workbook.Worksheets[0];
Cell cellC2 = sheet1.Cells["C2"]; bool isValidC2 = cellC2.GetValidationValue();
// expected: true, actual: false
Cell cellC3 = sheet1.Cells["C3"]; bool isValidC3 = cellC3.GetValidationValue();
// expected: true, actual: false
Cell cellC4 = sheet1.Cells["C4"]; bool isValidC4 = cellC4.GetValidationValue();
// expected: true, actual: false
Cell cellC5 = sheet1.Cells["C5"]; bool isValidC5 = cellC5.GetValidationValue();
// expected: true, actual: false
Cell cellC6 = sheet1.Cells["C6"]; bool isValidC6 = cellC6.GetValidationValue();
// expected: true, actual: false
Excel sheet
Data validation Not between.zip (8.5 KB)