@sheetwrite/coreinterface
One stable, range-scoped data-entry rule. Blank cells are allowed unless disabled.
- Package
@sheetwrite/core- Source
packages/core/src/types/document.ts#L142
Members 6
id
id: string;range
range: Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interface Range {
sheet: SheetId;
start: {
row: number;
col: number;
};
end: {
row: number;
col: number;
};
}Inclusive rectangular cell range on a stable sheet ID.API reference →;condition
condition: DataValidationConditiontype DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
// … 15 more lines — see the API reference
}type DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
// … 15 more lines — see the API reference
}type DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
// … 11 more lines — see the API reference
}Serializable condition enforced by a data-validation rule. min and max remain inclusive legacy bounds. Use comparison when the operator itself is significant; comparison and legacy bounds are mutually exclusive.API reference →;policy
policy: ValidationPolicytype ValidationPolicy = "reject" | "warn" | "allow";type ValidationPolicy = "reject" | "warn" | "allow";type ValidationPolicy =
"reject" | "warn" | "allow";Reject-or-warn policy attached to a data-validation rule.API reference →;allowBlank
allowBlank?: boolean;helpText
helpText?: string;Declaration
View full TypeScript declaration
export interface DataValidationRule { id: string; range: Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interface Range {
sheet: SheetId;
start: {
row: number;
col: number;
};
end: {
row: number;
col: number;
};
}Inclusive rectangular cell range on a stable sheet ID.API reference →; condition: DataValidationConditiontype DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
// … 15 more lines — see the API reference
}type DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
// … 15 more lines — see the API reference
}type DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
// … 11 more lines — see the API reference
}Serializable condition enforced by a data-validation rule. min and max remain inclusive legacy bounds. Use comparison when the operator itself is significant; comparison and legacy bounds are mutually exclusive.API reference →; policy: ValidationPolicytype ValidationPolicy = "reject" | "warn" | "allow";type ValidationPolicy = "reject" | "warn" | "allow";type ValidationPolicy =
"reject" | "warn" | "allow";Reject-or-warn policy attached to a data-validation rule.API reference →; allowBlank?: boolean; helpText?: string;}