ExcelScript.PrintOrder enum
Remarks
Examples
/**
* This script sets the print order for every worksheet in the workbook.
* The order of printed content will go over (e.g., left-to-right)
* then down (i.e., top-to-bottom).
*/
function main(workbook: ExcelScript.Workbook) {
// Access every worksheet in the workbook.
workbook.getWorksheets().forEach(worksheet => {
// Get the page layout for each sheet.
const layout: ExcelScript.PageLayout = worksheet.getPageLayout();
// Set the print order to over-then-down.
layout.setPrintOrder(ExcelScript.PrintOrder.overThenDown);
});
}
Fields
downThenOver | Process down the rows before processing across pages or page fields to the right. |
overThenDown | Process across pages or page fields to the right before moving down the rows. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts