ExcelScript.PageLayoutZoomOptions interface

Represents page zoom properties.

Remarks

Examples

/**
 * This script changes the scale-to-fit of the page layout.
 */
function main(workbook: ExcelScript.Workbook) {
    // Get the current worksheet.
    const sheet = workbook.getActiveWorksheet();

    // Scale the layout to half size for printing.
    const layout = sheet.getPageLayout();
    const zoomOptions: ExcelScript.PageLayoutZoomOptions = {
        scale: 50
    }
    layout.setZoom(zoomOptions)
}

Properties

horizontalFitToPages

Number of pages to fit horizontally. This value can be null if percentage scale is used.

scale

Print page scale value can be between 10 and 400. This value can be null if fit to page tall or wide is specified.

verticalFitToPages

Number of pages to fit vertically. This value can be null if percentage scale is used.

Property Details

horizontalFitToPages

Number of pages to fit horizontally. This value can be null if percentage scale is used.

horizontalFitToPages?: number;

Property Value

number

scale

Print page scale value can be between 10 and 400. This value can be null if fit to page tall or wide is specified.

scale?: number;

Property Value

number

verticalFitToPages

Number of pages to fit vertically. This value can be null if percentage scale is used.

verticalFitToPages?: number;

Property Value

number