Skip to content

excel validation set

goworm edited this page Jul 17, 2026 · 52 revisions

Excel: Data Validation - set

Modify existing data validation rules.

Path: /{SheetName}/validation[N]

Properties

Property Accepted Values Description
sqref cell/range reference Update the target range
type validation type Update validation type
formula1 value/formula Update first value
formula2 value/formula Update second value
operator operator keyword Update comparison operator
allowBlank bool Allow blank values
showError bool Toggle error alert
errorTitle string Update error title
error string Update error message
showInput bool Toggle input prompt
promptTitle string Update prompt title
prompt string Update prompt message
errorStyle stop, warning, information Update error-popup severity. Settable (v1.0.136+ schema-doc fix — the handler always supported it; the schema just under-claimed get-only).
inCellDropdown bool Show/hide the in-cell dropdown arrow for type=list. Settable (v1.0.136+ schema-doc fix, same under-claim). Inverse of raw OOXML showDropDown.
showDropDown bool Raw OOXML flag (inverted: true = HIDE the arrow). Settable (v1.0.136+); prefer inCellDropdown for clarity — get-only readback is not surfaced for this raw form.

Examples

officecli set data.xlsx /Sheet1/validation[1] --prop formula1="Yes,No,N/A"
officecli set data.xlsx /Sheet1/validation[2] --prop formula2=200 --prop error="Enter 1-200"

Based on OfficeCLI v1.0.137

Clone this wiki locally