API Reference
ExcelRangeDataValidationBuilder
Fluent data validation builder for an ExcelRange.
Inheritance
- Object
- ExcelRangeDataValidationBuilder
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property ExcelRange.Validate
- Property ExcelRange.Validation
Methods
public ExcelRange CustomFormula(String formula, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies custom formula validation.
Parameters
- formula System.String
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange Date(DataValidationOperatorValues operator, DateTime formula1, Nullable<DateTime> formula2 = null, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies date validation.
Parameters
- operator DocumentFormat.OpenXml.Spreadsheet.DataValidationOperatorValues
- formula1 System.DateTime
- formula2 System.Nullable{System.DateTime} = null
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange DateBetween(DateTime minimum, DateTime maximum, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies date validation between two dates.
Parameters
- minimum System.DateTime
- maximum System.DateTime
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange Decimal(DataValidationOperatorValues operator, Double formula1, Nullable<Double> formula2 = null, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies decimal-number validation.
Parameters
- operator DocumentFormat.OpenXml.Spreadsheet.DataValidationOperatorValues
- formula1 System.Double
- formula2 System.Nullable{System.Double} = null
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange DecimalBetween(Double minimum, Double maximum, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies decimal-number validation between two values.
Parameters
- minimum System.Double
- maximum System.Double
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange List(params String[] items) #ExcelRangeApplies list validation from inline items.
Parameters
- items System.String[]
public ExcelRange List(IEnumerable<String> items, Boolean allowBlank = true) #ExcelRangeApplies list validation from inline items.
Parameters
- items System.Collections.Generic.IEnumerable{System.String}
- allowBlank System.Boolean = true
public ExcelRange ListNamedRange(String namedRange, Boolean allowBlank = true) #ExcelRangeApplies list validation using a workbook or sheet-local named range.
Parameters
- namedRange System.String
- allowBlank System.Boolean = true
public ExcelRange ListRange(String sourceA1Range, String sourceSheetName = null, Boolean allowBlank = true) #ExcelRangeApplies list validation using a worksheet range.
Parameters
- sourceA1Range System.String
- sourceSheetName System.String = null
- allowBlank System.Boolean = true
public ExcelRange Messages(ExcelDataValidationMessageOptions options) #ExcelRangeApplies prompt and error message metadata to validations that overlap the range.
Parameters
- options OfficeIMO.Excel.ExcelDataValidationMessageOptions
public ExcelRange TextLength(DataValidationOperatorValues operator, Int32 formula1, Nullable<Int32> formula2 = null, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies text-length validation.
Parameters
- operator DocumentFormat.OpenXml.Spreadsheet.DataValidationOperatorValues
- formula1 System.Int32
- formula2 System.Nullable{System.Int32} = null
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange Time(DataValidationOperatorValues operator, TimeSpan formula1, Nullable<TimeSpan> formula2 = null, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies time validation.
Parameters
- operator DocumentFormat.OpenXml.Spreadsheet.DataValidationOperatorValues
- formula1 System.TimeSpan
- formula2 System.Nullable{System.TimeSpan} = null
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange WholeNumber(DataValidationOperatorValues operator, Int32 formula1, Nullable<Int32> formula2 = null, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies whole-number validation.
Parameters
- operator DocumentFormat.OpenXml.Spreadsheet.DataValidationOperatorValues
- formula1 System.Int32
- formula2 System.Nullable{System.Int32} = null
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
public ExcelRange WholeNumberBetween(Int32 minimum, Int32 maximum, Boolean allowBlank = true, String errorTitle = null, String errorMessage = null) #ExcelRangeApplies whole-number validation between two values.
Parameters
- minimum System.Int32
- maximum System.Int32
- allowBlank System.Boolean = true
- errorTitle System.String = null
- errorMessage System.String = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object