Class ExcelDataValidationAsType
Provides a simple way to type cast a data validation object to its actual class.
Inheritance
Inherited Members
Namespace: OfficeOpenXml.DataValidation
Assembly: EPPlus.dll
Syntax
public class ExcelDataValidationAsType
Properties
AnyValidation
Returns the data validation object as IExcelDataValidationAny
Declaration
public IExcelDataValidationAny AnyValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationAny | The data validation as an IExcelDataValidationAny or null if typecasting fails |
CustomValidation
Returns the data validation object as IExcelDataValidationCustom
Declaration
public IExcelDataValidationCustom CustomValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationCustom | The data validation as an IExcelDataValidationCustom or null if typecasting fails |
DateTimeValidation
Returns the data validation object as IExcelDataValidationDateTime
Declaration
public IExcelDataValidationDateTime DateTimeValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationDateTime | The data validation as an IExcelDataValidationDateTime or null if typecasting fails |
DecimalValidation
Returns the data validation object as IExcelDataValidationDecimal
Declaration
public IExcelDataValidationDecimal DecimalValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationDecimal | The data validation as an IExcelDataValidationDecimal or null if typecasting fails |
IntegerValidation
Returns the data validation object as IExcelDataValidationInt
Declaration
public IExcelDataValidationInt IntegerValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationInt | The data validation as an IExcelDataValidationInt or null if typecasting fails |
ListValidation
Returns the data validation object as IExcelDataValidationList
Declaration
public IExcelDataValidationList ListValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationList | The data validation as an IExcelDataValidationList or null if typecasting fails |
TimeValidation
Returns the data validation object as IExcelDataValidationTime
Declaration
public IExcelDataValidationTime TimeValidation { get; }
Property Value
Type | Description |
---|---|
IExcelDataValidationTime | The data validation as an IExcelDataValidationTime or null if typecasting fails |
Methods
Type<T>()
Converts the data validation object to it's implementing class or any of the abstract classes/interfaces inheriting the IExcelDataValidation interface.
Declaration
public T Type<T>()
where T : IExcelDataValidation
Returns
Type | Description |
---|---|
T | An instance of |
Type Parameters
Name | Description |
---|---|
T | The type of datavalidation object. T must be inherited from IExcelDataValidation |