Excel API Library for Java - Sample Browser | Document Solutions | Data Validation
[
フレーム]
src="bundle.js">
## Data Validation
Document Solutions for Excel lets you validate data by restricting the information format and the values that can be entered in cells of a worksheet. You can create distinct validation scenarios for individual cells or for a range of cells.
Document Solutions for Excel supports all types of validations, including:
- Whole Number
- Decimal
- List
- Date
- Time
- Text length
- Custom
Add validation for a range using the **Add** method of **IRange.Validation** property. The method returns an instance of the **IValidation** interface.
- To set input and error messages for the validation, use these properties:
-- InputMessage
-- ErrorMessage
- To specify whether to show the messages, use these properties:
-- ShowInputMessage
-- ShowError
- To specify whether to show a drop down list in a list validation:
-- InCellDropdown property
// Create a new workbook
Workbook workbook = new Workbook();null
// Save to an excel file
workbook.save("FolderExample.xlsx");
// Create a new workbook
var workbook = Workbook()
FIXME: No Kotlin code in this demo.
// Save to an excel file
workbook.save("FolderExample.xlsx")