Skip to content

setSheetPrintOrientation

Julian Halliwell edited this page Sep 20, 2021 · 3 revisions

Set the print orientation of a sheet to landscape or portrait. Applies to the currently active sheet by default.

setSheetPrintOrientation( workbook, mode[, sheetName[, sheetNumber] ] )

Required arguments

  • workbook spreadsheet object
  • mode string: either "landscape" or "portrait"

Optional arguments

  • sheetName string: the name of the sheet to apply the orientation mode to OR
  • sheetNumber numeric: the number (1 based, not zero-based) of the sheet to apply the orientation mode to

Chainable? Yes.

Example

spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.createSheet( workbook, "test" );
spreadsheet.setSheetPrintOrientation( workbook, "landscape", "test" );
Clone this wiki locally