-
-
Notifications
You must be signed in to change notification settings - Fork 36
setFitToPage
Julian Halliwell edited this page Sep 20, 2021
·
2 revisions
Turn the currently active sheet's "fit-to-page" print option on or off.
When enabled, the sheet's contents will be scaled onto a single page by default. Use the pagesWide
and pagesHigh
arguments to control how many pages to fit the columns/rows into when printed.
setFitToPage( workbook, state[, pagesWide[, pagesHigh] ] )
-
workbook
spreadsheet object -
state
boolean: true/false to enable/disable
-
pagesWide
integer: number of pages to fit the sheet's columns into: use 0 for no horizontal fit -
pagesHigh
integer: number of pages to fit the sheet's rows into: use 0 for no vertical fit
Chainable? Yes.
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
// fit the columns into one page, but allow the rows to fill as many pages as needed when printed
spreadsheet.setFitToPage( workbook, true, 1, 0 );