[]
Gets the name of the worksheet where this data validation JSON error occurred.
This property gets the worksheet name stored in this DataValidationJsonError when the error object was created. The value identifies the worksheet that contains the data validation entry that could not be processed during JSON import.
public string WorksheetName { get; }
Public ReadOnly Property WorksheetName 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 worksheetName = error.WorksheetName;