Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ExcelScript.PageLayoutZoomOptions interface
- Package:
- ExcelScript
Represents page zoom properties.
Remarks
Used by
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 |
| scale | Print page scale value can be between 10 and 400. This value can be |
| verticalFitToPages | Number of pages to fit vertically. This value can be |
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
Office Scripts
Feedback
Was this page helpful?
