set_data_validation
Applies list, number, decimal, text-length, or date validation rules to an Excel range, restricting cell entries and helping keep live spreadsheet data accurate.
Instructions
Set a data validation rule on a range. Supports list, wholeNumber, decimal, textLength, and date rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list | No | List type: comma-separated values, e.g. "Low,Medium,High". | |
| type | Yes | Validation type. | |
| range | Yes | A1 range address. | |
| formula1 | No | Numeric/date/textLength: bound value or formula. | |
| formula2 | No | Second bound for Between/NotBetween. | |
| operator | No | Numeric/date/textLength: comparison operator. | |
| sheetName | No | Worksheet name. Defaults to the active worksheet. | |
| allowBlank | No | Allow blank cells. Default true. | |
| workbookId | No | Target workbook ID from list_workbooks. Optional when only one workbook is connected. |