Skip to content

setActiveSheetNumber

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

Sets the active sheet (the one operations are carried out on), to the sheet specified by number.

setActiveSheetNumber( workbook, sheetNumber )

Required arguments

  • workbook spreadsheet object
  • sheetNumber numeric: number of the sheet to make the active sheet

Chainable? Yes.

Example

spreadsheet = New spreadsheet();
workbook = spreadsheet.new(); // creates "sheet1" by default
spreadsheet.createSheet( workbook,"sheet2" );
spreadsheet.createSheet( workbook,"sheet3" );
spreadsheet.setActiveSheetNumber( workbook,2 );
Clone this wiki locally