Skip to content
SumOfficeSumOfficeSumOffice

Printing and layout

Page setup, breaks, sheet background, and printing chart sheets. Operations on this page: 7.

Page setup, breaks, sheet background, and printing chart sheets. Terms are in the glossary.

Applies an edit to the sheet background.

Request

Field TypeScript type Req.
operation "apply_sheet_background_patch" yes
subsetId string yes
packageBytesBase64 string yes
patch ContractXlsxSheetBackgroundPatch yes
requestedBackend ComputeBackendKind | null no

Response on success · apply_sheet_background_patch

Field TypeScript type Req.
operation "apply_sheet_background_patch" yes
packageBytesBase64 string yes
byteCount number yes
applied boolean yes

Minimal JSON template

{
"operation": "apply_sheet_background_patch",
"subsetId": "<subsetId>",
"packageBytesBase64": "<base64>",
"patch": "<ContractXlsxSheetBackgroundPatch>",
"requestedBackend": "native-desktop"
}

Applies the sheet’s page setup.

Request

Field TypeScript type Req.
operation "apply_worksheet_page_setup" yes
subsetId string yes
sheetKey string yes
pageSetup ContractWorksheetPageSetup yes
expectedRevision number | null no
viewport ViewportWindow | null no
requestedBackend ComputeBackendKind | null no

Response on success · apply_worksheet_page_setup

Field TypeScript type Req.
operation "apply_worksheet_page_setup" yes
subsetId string yes
session ContractSubsetSessionInfo yes
supportedSubset string yes
delta DeltaSummary yes
changedPageSetup boolean yes
pageSetup ContractWorksheetPageSetup yes
workbookHistory ContractWorkbookHistoryProjection yes
dirtyCellCount number yes
currentSourceSaveReadiness ContractCurrentSourceSaveReadiness | null no
activeSheet ContractActiveSheetMeta yes
geometry ContractGeometrySubset yes
recalcNeeded boolean yes
viewport ViewportWindow yes
previewCells ContractPreviewCell[] yes
layoutMetrics ContractLayoutMetricsSubset yes

Minimal JSON template

{
"operation": "apply_worksheet_page_setup",
"subsetId": "<subsetId>",
"sheetKey": "<sheetPath>",
"pageSetup": "<ContractWorksheetPageSetup>",
"requestedBackend": "native-desktop"
}

Computes the page-break layout.

Request

Field TypeScript type Req. Note from the contract
operation "compute_page_break_layout" yes
subsetId string yes
sheetKey string yes
usedRowEnd number yes The bottom-right corner of the used area that pagination needs to cover. Zero-based, bounds inclusive.
usedColEnd number yes
pageSetup ContractPageBreakPageSetup yes
manualRowBreaks number[] yes The row numbers the user placed a manual page break before. Zero-based.
manualColBreaks number[] yes The column numbers the user placed a manual page break before. Zero-based.
requestedBackend ComputeBackendKind | null no

Response on success · compute_page_break_layout

Field TypeScript type Req.
operation "compute_page_break_layout" yes
subsetId string yes
session ContractSubsetSessionInfo yes
rowBreaks ContractPageBreakLine[] yes
colBreaks ContractPageBreakLine[] yes
pagesAcross number yes
pagesDown number yes
pageCount number yes

Minimal JSON template

{
"operation": "compute_page_break_layout",
"subsetId": "<subsetId>",
"sheetKey": "<sheetPath>",
"usedRowEnd": 0,
"usedColEnd": 0,
"pageSetup": "<ContractPageBreakPageSetup>",
"manualRowBreaks": 0,
"manualColBreaks": 0,
"requestedBackend": "native-desktop"
}

Creates a chart sheet within given bounds.

Request

Field TypeScript type Req.
operation "create_chart_sheet_bounded" yes
subsetId string yes
sourceSheetKey string yes
sourceChartStableId string yes
name string yes
targetIndex number | null no
viewport ViewportWindow | null no
requestedBackend ComputeBackendKind | null no

Response on success · create_chart_sheet_bounded

Field TypeScript type Req.
operation "create_chart_sheet_bounded" yes
subsetId string yes
session ContractSubsetSessionInfo yes
supportedSubset string yes
delta DeltaSummary yes
createdSheet ContractActiveSheetMeta yes
activeSheet ContractActiveSheetMeta yes
sheetCount number yes
workbookSheets ContractWorkbookSheetMeta[] yes
geometry ContractGeometrySubset yes
recalcNeeded boolean yes
viewport ViewportWindow yes
previewCells ContractPreviewCell[] yes
surfaceObjects ContractSheetObject[] yes
layoutMetrics ContractLayoutMetricsSubset | null no
nativeChartsheetClaim "live_verified" yes
lifecycleClaim "live_verified" yes
macroSheetParityClaim "no" yes
dialogSheetParityClaim "no" yes

Minimal JSON template

{
"operation": "create_chart_sheet_bounded",
"subsetId": "<subsetId>",
"sourceSheetKey": "<string>",
"sourceChartStableId": "<string>",
"name": "<string>",
"requestedBackend": "native-desktop"
}

Request

Field TypeScript type Req.
operation “mutate_worksheet_page_breaks” yes
subsetId string yes
sheetKey string yes
intent ContractWorksheetPageBreakIntent yes
expectedRevision number yes
viewport ViewportWindow | null no

Response on success · mutate_worksheet_page_breaks

Field TypeScript type Req.
operation “mutate_worksheet_page_breaks” yes
subsetId string yes
session ContractSubsetSessionInfo yes
delta DeltaSummary yes
changedPageBreaks boolean yes
effectiveScale number yes
areas ContractPageBreakAreaProjection[] yes
rowBreaks ContractPageBreakLine[] yes
colBreaks ContractPageBreakLine[] yes
pagesAcross number yes
pagesDown number yes
pageCount number yes
workbookHistory ContractWorkbookHistoryProjection yes
dirtyCellCount number yes
recalcNeeded boolean yes
activeSheet ContractActiveSheetMeta yes
geometry ContractGeometrySubset yes
viewport ViewportWindow yes
previewCells ContractPreviewCell[] yes
layoutMetrics ContractLayoutMetricsSubset yes

Minimal JSON template

{
"operation": "mutate_worksheet_page_breaks",
"subsetId": "<subsetId>",
"sheetKey": "<sheetKey>",
"intent": "<ContractWorksheetPageBreakIntent>",
"expectedRevision": 0
}

Builds a preview: printing a chart sheet.

Request

Field TypeScript type Req.
operation "preview_chart_sheet_print" yes
subsetId string yes
sheetKey string yes
requestedBackend ComputeBackendKind | null no

Response on success · preview_chart_sheet_print

Field TypeScript type Req.
operation "preview_chart_sheet_print" yes
subsetId string yes
session ContractSubsetSessionInfo yes
delta DeltaSummary yes
chartSheet ContractActiveSheetMeta yes
workbookSheets ContractWorkbookSheetMeta[] yes
settings ContractChartSheetPrintSettings yes
preview ContractChartSheetPrintPreview yes
nativeChartsheetClaim "live_verified" yes
printPreviewClaim "live_verified" yes
macroSheetParityClaim "no" yes
dialogSheetParityClaim "no" yes

Minimal JSON template

{
"operation": "preview_chart_sheet_print",
"subsetId": "<subsetId>",
"sheetKey": "<sheetPath>",
"requestedBackend": "native-desktop"
}

Sets up printing for a chart sheet within given bounds.

Request

Field TypeScript type Req.
operation "set_chart_sheet_print_bounded" yes
subsetId string yes
sheetKey string yes
settings ContractChartSheetPrintSettings yes
viewport ViewportWindow | null no
requestedBackend ComputeBackendKind | null no

Response on success · set_chart_sheet_print_bounded

Field TypeScript type Req.
operation "set_chart_sheet_print_bounded" yes
subsetId string yes
session ContractSubsetSessionInfo yes
delta DeltaSummary yes
didChange boolean yes
chartSheet ContractActiveSheetMeta yes
workbookSheets ContractWorkbookSheetMeta[] yes
settings ContractChartSheetPrintSettings yes
preview ContractChartSheetPrintPreview yes
nativeChartsheetClaim "live_verified" yes
printPreviewClaim "live_verified" yes
macroSheetParityClaim "no" yes
dialogSheetParityClaim "no" yes

Minimal JSON template

{
"operation": "set_chart_sheet_print_bounded",
"subsetId": "<subsetId>",
"sheetKey": "<sheetPath>",
"settings": "<ContractChartSheetPrintSettings>",
"requestedBackend": "native-desktop"
}

Documentation assistant

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