[]
Gets the cell range associated with the data validation error.
This property gets the range string recorded for the data validation error when JSON content is imported and a data validation issue is detected.
public string Range { get; }
Public ReadOnly Property Range As String
Workbook sourceWorkbook = new Workbook();
IValidation validation = sourceWorkbook.Worksheets[0].Range["A1:A3"].Validation;
validation.Add(ValidationType.Custom, ValidationAlertStyle.Stop,
ValidationOperator.Between, "=A1>0", null);
string json = sourceWorkbook.ToJson().Replace("A1>0", "A1>");
Workbook importedWorkbook = new Workbook();
DeserializationOptions options = new DeserializationOptions();
IList<JsonError> errors = importedWorkbook.FromJson(json, options);
DataValidationJsonError error = (DataValidationJsonError)errors[0];
string range = error.Range;