Namespace OfficeOpenXml.DataValidation¶
Namespaces¶
OfficeOpenXml.DataValidation.Contracts
OfficeOpenXml.DataValidation.Events
OfficeOpenXml.DataValidation.Exceptions
Classes¶
Abstract base class for all Excel datavalidations. Contains functionlity which is common for all these different validation types.
Any value validation.
Provides a simple way to type cast a data validation object to its actual class.
Collection of [ExcelDataValidation](OfficeOpenXml.DataValidation.ExcelDataValidation.md). This class is providing the API for EPPlus data validation.
The public methods of this class (Add[...]Validation) will create a datavalidation entry in the worksheet. When this validation has been created changes to the properties will affect the workbook immediately.
Each type of validation has either a formula or a typed value/values, except for custom validation which has a formula only.
// Add a date time validation
var validation = worksheet.DataValidation.AddDateTimeValidation("A1");
// set validation properties
validation.ShowErrorMessage = true;
validation.ErrorTitle = "An invalid date was entered";
validation.Error = "The date must be between 2011-01-31 and 2011-12-31";
validation.Prompt = "Enter date here";
validation.Formula.Value = DateTime.Parse("2011-01-01");
validation.Formula2.Value = DateTime.Parse("2011-12-31");
validation.Operator = ExcelDataValidationOperator.between;
Custom validation, i.e. a formula.
Validation for DateTime.
Data validation for decimal values
Data validation for integer values.
This class represents an List data validation.
Validation for times (ExcelTime).
Types of datavalidation
ExcelDataValidationWithFormula<T>
A validation containing a formula
ExcelDataValidationWithFormula2<T>
Represents a data validation with two formulas
Represents a time between 00:00:00 and 23:59:59
Interfaces¶
Provides functionality for adding datavalidation to a range (ExcelRangeBase). Each method will return a configurable validation.
Enums¶
Mode for east-asian languages who use Input Method Editors(IME)
Operator for comparison between Formula and Formula2 in a validation.
ExcelDataValidationWarningStyle
warning style, controls how Excel will handle invalid changes.
Enum for available data validation types