Skip to content
SumOfficeSumOfficeSumOffice

Types: formatting

Compute Contract type definitions — styles, fonts, themes, borders, conditional formatting, rows and columns. Names: 70.

Definitions of the names from the “TypeScript type” column on the operation pages.

Other dictionary topics: session, workbook, and sheets · cells and ranges · formulas and calculation · formatting · data and sheet objects · pivot tables · charts and graphics · printing and page layout · Power Query · VBA and macros · protection and review · general and utility.

Types on this page — 70
interface ColumnProfile {
name: string;
typeName: ContractPowerQueryCellKind | "mixed" | "null";
nullCount: number;
errorCount: number;
emptyCount: number;
validCount: number;
distinctCount: number;
distinctCapped: boolean;
distribution: ColumnValueFrequency[];
validRatio: number;
errorRatio: number;
emptyRatio: number;
}
interface ColumnValueFrequency {
value: string;
kind: ContractPowerQueryCellKind;
count: number;
}
interface ContractApplyThemeFontsPatch {
majorTypeface: string;
minorTypeface: string;
}
interface ContractCellStyleDefinition {
identity: string;
name: string;
builtIn: boolean;
builtinId?: number | null;
editable: boolean;
deletable: boolean;
duplicable: boolean;
category: string;
formatting: ContractCellStyleFormatting;
xfId: number;
applicationStyleIndex: number;
usageCount: number;
opaque: boolean;
rawXmlDigest: string;
}
type ContractCellStyleFormatting = Omit< ContractPreviewFormatting, "dataBar" | "conditionalIcon" | "conditionalFillKind" >;
type ContractCellStyleMutation =
| { kind: "create"; draftIdentity: string; name: string; basedOnIdentity?: string
| null; formatting?: ContractCellStyleFormatting
| null; }
| { kind: "modify";
identity: string;
name: string;
formatting: ContractCellStyleFormatting;
expectedRawXmlDigest: string;
}
| { kind: "duplicate"; identity: string; draftIdentity: string; name: string; }
| { kind: "delete"; identity: string; expectedRawXmlDigest: string; };
type ContractCellStylesManagerAction =
| { action: "inspect" }
| { action: "commit"; mutations: ContractCellStyleMutation[]; expectedOpaqueStyleIdentities?: string[]; }
| { action: "applyStyle"; identity: string; target: CellRange }
| { action: "mergeFromWorkbook"; sourceSubsetId: string; identities?: string[]; };
interface ContractCellStylesManagerAuthority {
canApply: boolean;
readOnly: boolean;
protected: boolean;
sourceKindLive: boolean;
refusalCode?: string | null;
}
interface ContractColumnWidth {
col: number;
width: number;
}
type ContractConditionalComparison = "greaterThan" | "lessThan" | "equalTo";

ContractConditionalFormattingManagerAction

Section titled “ContractConditionalFormattingManagerAction”
type ContractConditionalFormattingManagerAction =
| { action: "inspect" }
| { action: "apply"; rules: ContractConditionalRule[]; expectedOpaqueRuleIdentities?: string[]; };

ContractConditionalFormattingManagerAuthority

Section titled “ContractConditionalFormattingManagerAuthority”
interface ContractConditionalFormattingManagerAuthority {
canApply: boolean;
readOnly: boolean;
protected: boolean;
sourceKindLive: boolean;
refusalCode?: string | null;
}
interface ContractConditionalFormattingOpaqueRule {
identity: string;
ruleType: string;
priority: number;
stopIfTrue: boolean;
appliesTo: string;
formulas: string[];
rawXmlDigest: string;
editable: false;
refusalCode: "conditional-formatting-opaque-rule-read-only" | string;
}
type ContractConditionalPopulationKind = "duplicate" | "unique";
interface ContractConditionalRange {
rowStart: number;
rowEnd: number;
colStart: number;
colEnd: number;
}
type ContractConditionalRankDirection = "top" | "bottom";
interface ContractConditionalRule {
id: string;
priority: number;
stopIfTrue: boolean;
appliesTo: ContractConditionalRange[];
kind: ContractConditionalRuleKind;
visual: ContractConditionalRuleVisual;
pivotScope?: ContractPivotConditionalRuleScope | null;
}
type ContractConditionalRuleKind =
| { type: "compare"; operator: ContractConditionalComparison; operand: ContractConditionalScalar; }
| { type: "between"; lower: ContractConditionalScalar; upper: ContractConditionalScalar; }
| { type: "textContains"; value: string }
| { type: "population"; value: ContractConditionalPopulationKind }
| { type: "rank"; direction: ContractConditionalRankDirection; amount: number; percent: boolean; }
| { type: "average"; above: boolean }
| { type: "twoColorScale" }
| { type: "threeColorScale" }
| { type: "dataBar" }
| { type: "iconSet" }
| { type: "formula"; value: string };
interface ContractConditionalRuleVisual {
dxfId?: number | null;
fillColor?: string | null;
fontColor?: string | null;
bold: boolean;
dataBarColor?: string | null;
colorScaleColors: string[];
iconSet?: string | null;
}
type ContractConditionalScalar =
| { kind: "blank" }
| { kind: "emptyString" }
| { kind: "number"; value: number }
| { kind: "text"; value: string }
| { kind: "boolean"; value: boolean }
| { kind: "error"; value: string };
interface ContractDataCleanupPreviewRow {
sourceRow: number;
values: ContractDataCleanupPreviewValue[];
duplicate?: boolean;
}
interface ContractDataCleanupRowSpan {
rowStart: number;
rowEnd: number;
}
interface ContractDelimitedColumnFormat {
sourceIndex: number;
format: ContractTextToColumnsColumnFormat;
}
type ContractFileFormat = (typeof CONTRACT_FILE_FORMAT_IDS)[number];
interface ContractFormatCapabilities {
fileFormat: ContractFileFormat;
containerFamily: ContractContainerFamily;
openCapability: ContractCapabilityLevel;
editCapability: ContractCapabilityLevel;
saveCapability: ContractSaveCapability;
saveKind: ContractSaveKind;
fidelityClass: ContractFidelityClass;
nonGoals: ContractFormatNonGoal[];
}
type ContractMergeCellsMode = "merge" | "merge-and-center" | "merge-across";
interface ContractNormalStyleFont {
family: string;
explicitFamily: string | null;
themeScheme: string | null;
sizePoints: number;
bold: boolean;
italic: boolean;
}
interface ContractPreviewBorderSide {
style: ContractPreviewBorderStyle;
color?: string | null;
}
type ContractPreviewBorderStyle =
| "thin"
| "hair"
| "dotted"
| "dashed"
| "dashDot"
| "dashDotDot"
| "medium"
| "mediumDashed"
| "mediumDashDot"
| "mediumDashDotDot"
| "slantDashDot"
| "thick"
| "double";
interface ContractPreviewBorders {
left?: ContractPreviewBorderSide | null;
right?: ContractPreviewBorderSide | null;
top?: ContractPreviewBorderSide | null;
bottom?: ContractPreviewBorderSide | null;
diagonalUp?: ContractPreviewBorderSide | null;
diagonalDown?: ContractPreviewBorderSide | null;
}
type ContractPreviewConditionalFillKind = "cellIs" | "containsText" | "colorScale";
interface ContractPreviewConditionalIcon {
glyph: string;
color: string;
label?: string | null;
}
type ContractPreviewFontVerticalAlign = "baseline" | "superscript" | "subscript";
interface ContractPreviewFormatting {
fillColor?: string | null;
gradientFill?: ContractPreviewGradientFill | null;
patternFill?: ContractPreviewPatternFill | null;
dataBar?: ContractPreviewDataBar | null;
conditionalIcon?: ContractPreviewConditionalIcon | null;
conditionalFillKind?: ContractPreviewConditionalFillKind | null;
numberFormat?: string | null;
fontColor?: string | null;
fontFamily?: string | null;
fontSize?: number | null;
bold?: boolean;
italic?: boolean;
fontVerticalAlign?: ContractPreviewFontVerticalAlign | null;
underlineKind?: ContractPreviewUnderlineKind | null;
underline?: boolean;
strike?: boolean;
horizontalAlign?: ContractPreviewHorizontalAlign | null;
verticalAlign?: ContractPreviewVerticalAlign | null;
wrapText?: boolean;
shrinkToFit?: boolean;
textRotation?: number | null;
indent?: number | null;
borders?: ContractPreviewBorders | null;
locked?: boolean | null;
hidden?: boolean | null;
}
interface ContractPreviewGradientFill {
degree?: number | null;
stops: ContractPreviewGradientStop[];
}
interface ContractPreviewPatternFill {
kind: ContractPreviewPatternFillKind;
fgColor?: string | null;
bgColor?: string | null;
}
type ContractPreviewPatternFillKind =
| "solid"
| "darkGray"
| "mediumGray"
| "lightGray"
| "gray125"
| "gray0625"
| "darkHorizontal"
| "darkVertical"
| "darkDown"
| "darkUp"
| "darkGrid"
| "darkTrellis"
| "lightHorizontal"
| "lightVertical"
| "lightDown"
| "lightUp"
| "lightGrid"
| "lightTrellis";
type ContractRangeFilterColumnCriteria = { column: number; } & ContractRangeFilterPredicate;
interface ContractRowHeight {
row: number;
height: number;
}
interface ContractTableColumnMetadata {
id: number | null;
name: string;
dataRange?: string | null;
calculatedColumnFormula?: string | null;
totalsRowFunction?: string | null;
totalsRowFormula?: string | null;
}
interface ContractTableStyleDefinition {
identity: string;
name: string;
builtIn: boolean;
category: "light" | "medium" | "dark" | "custom" | string;
displayOrder: number;
isDefault: boolean;
supported: boolean;
opaque: boolean;
editable: boolean;
deletable: boolean;
duplicable: boolean;
appliedTableCount: number;
elements: ContractTableStyleElementDefinition[];
rawXmlDigest: string;
}
interface ContractTableStyleElementDefinition {
elementType: string;
stripeSize?: number | null;
dxfId?: number | null;
formatting?: ContractCellStyleFormatting | null;
opaque: boolean;
rawXmlDigest: string;
}
type ContractTableStyleMutation =
| { kind: "create"; draftIdentity: string; name: string; basedOnIdentity?: string
| null; elements?: ContractTableStyleElementDefinition[] }
| { kind: "modify";
identity: string;
name: string;
elements: ContractTableStyleElementDefinition[];
expectedRawXmlDigest: string }
| { kind: "duplicate"; identity: string; draftIdentity: string; name: string }
| { kind: "delete"; identity: string; expectedRawXmlDigest: string }
| { kind: "setDefault"; identity: string };
interface ContractTableStyleOptions {
showHeaderRow: boolean;
showTotalRow: boolean;
showFirstColumn: boolean;
showLastColumn: boolean;
showRowStripes: boolean;
showColumnStripes: boolean;
}
type ContractTableStylesManagerAction =
| { action: "inspect"; tableStableId?: string
| null }
| { action: "commit"; mutations: ContractTableStyleMutation[]; expectedOpaqueStyleIdentities?: string[] }
| { action: "applyStyle"; tableStableId: string; identity: string; options: ContractTableStyleOptions };
interface ContractTableStylesManagerAuthority {
canApply: boolean;
readOnly: boolean;
protected: boolean;
sourceKindLive: boolean;
tableMissing: boolean;
refusalCode?: string | null;
}
interface ContractTableTotalColumn {
columnName: string;
function?: string | null;
formula?: string | null;
label?: string | null;
}
interface ContractTextToColumnsAdvancedOptions {
decimalSeparator?: string | null;
thousandsSeparator?: string | null;
}
type ContractTextToColumnsColumnFormat = "general" | "text" | "skip" | "date_mdy" | "date_dmy" | "date_ymd";
interface ContractXlsxCellFormatPatch {
activeSheetPath: string;
cellRef: string;
fillColor?: string | null;
patternFill?: ContractPreviewPatternFill | null;
fontColor?: string | null;
fontFamily?: string | null;
fontSize?: number | null;
numberFormat?: string | null;
bold?: boolean | null;
italic?: boolean | null;
fontVerticalAlign?: ContractPreviewFontVerticalAlign | null;
underline?: boolean | null;
strike?: boolean | null;
horizontalAlign?: string | null;
verticalAlign?: string | null;
wrapText?: boolean | null;
shrinkToFit?: boolean | null;
locked?: boolean | null;
hidden?: boolean | null;
borders?: ContractPreviewBorders | null;
textRotation?: number | null;
borderPreset?: string | null;
diagonalUp?: boolean | null;
diagonalDown?: boolean | null;
}
interface ContractXlsxColumnOutlineGroupPatch {
activeSheetPath: string;
colStart: number;
colEnd: number;
outlineLevel?: number | null;
hidden?: boolean | null;
}
interface ContractXlsxColumnOutlineRangePatch {
activeSheetPath: string;
colStart: number;
colEnd: number;
outlineLevel?: number | null;
hidden?: boolean | null;
summaryBelow?: boolean | null;
summaryRight?: boolean | null;
}
interface ContractXlsxColumnOutlineUngroupPatch {
activeSheetPath: string;
colStart: number;
colEnd: number;
}
interface ContractXlsxDelimitedColumnRulePatch {
sourceIndex: number;
type: "auto" | "general" | "text" | "date" | "skip";
dateOrder?: "mdy" | "dmy" | "ymd" | null;
}
interface ContractXlsxRowOutlineGroupPatch {
activeSheetPath: string;
rowStart: number;
rowEnd: number;
outlineLevel?: number | null;
hidden?: boolean | null;
}
interface ContractXlsxRowOutlineRangePatch {
activeSheetPath: string;
rowStart: number;
rowEnd: number;
outlineLevel?: number | null;
hidden?: boolean | null;
summaryBelow?: boolean | null;
summaryRight?: boolean | null;
}
interface ContractXlsxRowOutlineUngroupPatch {
activeSheetPath: string;
rowStart: number;
rowEnd: number;
}
interface FlashFillCandidateView { id: string; label: string; pattern: Record<string, unknown> }
interface FlashFillExample { sources: FlashFillValue[]; output: FlashFillValue }
interface FlashFillInference {
candidates: FlashFillCandidateView[];
selectedCandidateId?: string | null;
ambiguous: boolean;
previews: FlashFillPreviewCell[];
deterministicHash: string;
}
type FlashFillMode = "infer" | "preview" | "apply";
interface FlashFillPreviewCell {
sheetKey: string;
row: number;
col: number;
value: FlashFillValue;
skipped: boolean;
}
interface FlashFillRefusalContext {
readOnly?: boolean;
protected?: boolean;
tableBoundary?: boolean;
spill?: boolean;
merged?: boolean;
cancelled?: boolean;
}
interface FlashFillTargetRow {
sheetKey: string;
row: number;
col: number;
sources: FlashFillValue[];
targetHasFormula?: boolean;
targetIsNonblank?: boolean;
filteredOut?: boolean;
}
interface FlashFillValue { kind: FlashFillValueKind; text: string }
type FlashFillValueKind = | "blank" | "empty-string" | "text" | "number" | "date" | "time" | "error" | "formula";
interface MWireTableRowType {
columns: MWireTypeField[];
}
type SortRangeRowsDirection = "ascending" | "descending";
interface SortRangeRowsLevel {
col: number;
direction: SortRangeRowsDirection;
customOrder?: string[];
}
type SortRangeRowsNumericTextMode = "as_text" | "as_number";

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.