moveSheet - cfsimplicity/spreadsheet-cfml GitHub Wiki
Moves the named sheet to the specified new position.
moveSheet( workbook, sheetName, newPosition )
Required arguments
workbook
spreadsheet objectsheetName
string: the name of the sheet to removenewPosition
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