Skip to content
Julian Halliwell edited this page Jun 22, 2024 · 1 revision

Moves the named sheet to the specified new position.

moveSheet( workbook, sheetName, newPosition )

Required arguments

  • workbook spreadsheet object
  • sheetName string: the name of the sheet to remove
  • newPosition integer: the new position the sheet should appear at within the work book

Chainable? Yes.

Example

spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.createSheet( workbook, "test" ); // create a second sheet
spreadsheet.moveSheet( workbook, "test", 1 ); // move the new sheet so it's the first sheet in the workbook
Clone this wiki locally