ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
Add Listeners.
Optionaloptions: IListener.OptionsApplies the condition.
Similar to delete but cleans resources and can't be undone.
Deletes the anchored item.
Whether the cell at the specified coordinates fails this validation.
The sheet row.
The sheet column.
This validation's answer alone. Where validations overlap, a cell is invalid when any of the ones covering it fails (ICellRange.getDataValidations).
An empty cell fails when Ignore blank is off (isIncludeBlanks is false) and the rule
rejects a blank there, as Excel's Circle Invalid Data circles it. With Ignore blank on, an
empty cell never fails. A cell holding "" (a formula's empty text) is a value, and is judged.
The number of cells that fail this validation, empty cells included.
The cells that fail this validation, each as a [coords, true] entry, empty cells included.
Optionaloptions: ICellRange.IteratorOptions<ICellRange.Address>
axis and reverse set the order within each of the validation's ranges; the
ranges are visited in their own order.
OptionalgetReturn the condition, or null if none is set.
Returns the index of this data validation within its container: its priority, 0 first.
Where validations overlap, the lowest index supplies the prompt and the alert style; see IDataValidation. The writer saves the rules in this order.
The items a list validation offers at a cell: what its in-cell dropdown lists.
The cell's row.
The cell's column. A relative source ($F1:$G1, INDIRECT($E1)) gives each
cell its own list, as it does in Excel.
The set's members: its items, then what its source lists in source order,
duplicates kept, then its typed additions, with any subtractions left out. Empty
when this is not a list validation or the set lists nothing. Blank source cells are
not listed.
OptionalgetThe name of the anchor or null if it has none.
Returns the ranges this object is anchored to, in authored order.
Optionaloptions: ICellRange.GetRangeOptionsnull. An item whose last range was removed by a row/column delete returns an
invalid ranges — ask ICellRanges.isInvalid, the same contract as
ITable.getDataRange.getRange() for it, but data validations, conditional formats and protected ranges are
authored as several, and any single range can become several when a delete splits it.How a cell the rule covers asks to be drawn and edited, as keywords a client may honor.
Returns a snapshot of the data validation that can be used for copying and archiving.
Optionaloptions: CopyOptionsReturns if the model has been closed
Returns if the model has been deleted
If the anchor is unable to be modified.
The message of the alert raised for a value that fails the rule (Excel's Error Message).
Optionaloptions: ITransaction.OperationOptionsSets the style of the alert raised when a user enters a value that fails the rule.
Optionaloptions: ITransaction.OperationOptionsStop refuses the entry, Warning asks before accepting it, and Information accepts it with
a message. Where validations overlap, the first failing rule's style is the one used.
The alert answers what a user types or picks, as in Excel. A value written through the API, pasted or filled raises no alert and is never refused.
The style applies only while setShowAlertMessage is on. With it off, an invalid entry is accepted without a word whatever the style, as in Excel, so a rule meant to refuse entry needs both.
Title text of the alert.
The title text of the alert.
Optionaloptions: ITransaction.OperationOptionsSet the condition.
Optionaloptions: ITransaction.OperationOptionsSet whether to suppress the in-cell dropdown arrow for a list validation.
true to hide the dropdown arrow.
Optionaloptions: ITransaction.OperationOptionsSets whether blanks are included in validation.
Optionaloptions: ITransaction.OperationOptionsSets the index of this data validation within its container.
The new index to set. See getIndex.
The message shown while a cell the rule covers is selected (Excel's Input Message).
Optionaloptions: ITransaction.OperationOptionsShown only while isShowPromptMessage is on. Where validations overlap, the first covering rule with a prompt shows its own.
Title text of the prompt.
The title text of the prompt.
Optionaloptions: ITransaction.OperationOptionsRe-anchors this rule to address, REPLACING every range it currently covers.
The range or ranges to cover — anything ISheet.getRanges accepts
('A1:C20', 'A1:A5, C1:C5', coords). Resolved against this rule's own sheet.
Optionaloptions: ITransaction.OperationOptions
Transaction options; description names the entry in undo history.
A REPLACE, not an add: the ranges named become the whole anchor. An address that names nothing throws rather than leaving the rule unanchored — clearing is IAnchored.delete.
Undoable, and refused on a protected sheet. A rule spans several ranges as readily as
one; Excel writes them as one sqref, and so do we.
Sets whether a value that fails the rule raises the alert when a user enters it.
Optionaloptions: ITransaction.OperationOptionsWith the alert off, a failing entry is accepted silently, whatever the getAlertStyle. It is still invalid: getAlertAt reports it either way.
Sets whether to show the prompt when a cell the rule covers is selected.
Optionaloptions: ITransaction.OperationOptionsThe current state as a JSON object, or null if there is no state.
Updates multiple properties of the data validation.
Optionaloptions: ITransaction.OperationOptions
A data validation: a rule that a cell's value must satisfy, over one or more ranges of a sheet, with the prompt shown when the cell is selected and the alert for a value that fails.
Remarks
Validations may overlap, and every one covering a cell applies: the cell is valid only when each of them accepts its value. Where a single answer is needed, the rule with the lowest getIndex wins: the prompt is the first covering rule's that has one, the alert the first failing rule's, and the dropdown offers the items every covering list rule accepts. Excel keeps one validation per cell, and when it opens a file whose validations overlap it honors only the first; see ICell.getDataValidation.
The rule judges the value a cell holds, whatever wrote it. A value set through the API, pasted or filled is never refused; it is simply invalid, and getAlertAt says so.