Tutorial by Examples

//Add a List validation to B column. Values should be in a list var val = worksheet.DataValidations.AddListValidation("B:B"); //Shows error message when the input doesn't match the accepted values val.ShowErrorMessage = true; //Style of warning. "information" and "warn...
//Add a List validation to the C column var val3 = worksheet.DataValidations.AddIntegerValidation("E:E"); //For Integer Validation, you have to set error message to true val3.ShowErrorMessage = true; val3.Error = "The value must be an integer between 0 and 10"; //Minimum a...
//Add a DateTime Validation to column F var val4 = worksheet.DataValidations.AddDateTimeValidation("F:F"); //For DateTime Validation, you have to set error message to true val4.ShowErrorMessage = true; //Minimum allowed date val4.Formula.Value = new DateTime(2017,03,15, 01, 0,0); /...
//Add a TextLength Validation to column G var val5 = worksheet.DataValidations.AddTextLengthValidation("G:G"); //For TextLenght Validation, you have to set error message to true val5.ShowErrorMessage = true; //Minimum allowed text lenght val5.Formula.Value = 3; //Maximum allowed te...

Page 1 of 1