EasyXLS

Data validation

EasyXLS™ library allows you to set data validation for an Excel cell or cell ranges.

If data validation is set, restrictions when entering values are applied on the cells.

EasyXLS also allows reading Excel files with data validation included.

You can also specify the validation type, the operator and formula restrictions, input message and error alert.

Source code sample

The below example shows how to export an Excel file with two types of data validation defined: list and whole number.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

The screen shot provides an example of an Excel file with data validation applied on cell ranges.

Excel data validation

Data validation type

EasyXLS supports the following types of validation:
- Whole number
- Decimal
- Drop down list
- Date
- Time
- Text length
- Custom

Input message

EasyXLS allows you to set the input message for data validation using ExcelDataValidator.setInputMessage, ExcelDataValidator.setInputTitle and ExcelDataValidator.setInputText methods.

Error alert

EasyXLS allows you to set the error alert style and message using ExcelDataValidator.setErrorAlert, ExcelDataValidator.setErrorStyle, ExcelDataValidator.setErrorTitle and ExcelDataValidator.setErrorText methods.

Drop down list validation type

EasyXLS allows you to create drop down list as data validation for Excel cell ranges or cells.


 

Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2019
MS Excel 2021
Office 365
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT