-
-
Notifications
You must be signed in to change notification settings - Fork 36
renameSheet
Julian Halliwell edited this page Sep 20, 2021
·
4 revisions
Changes the name of the sheet specified by number to the given name.
renameSheet( workbook, sheetName, sheetNumber )
-
workbook
spreadsheet object -
sheetName
string: the new name to give the sheet. Must not be the name of an existing sheet. -
sheetNumber
numeric: the number of the sheet to rename
Chainable? Yes.
Will throw an exception if you try to rename to an existing sheet name.
spreadsheet = New spreadsheet();
workbook = spreadsheet.new(); // creates "sheet1" by default
spreadsheet.createSheet( workbook,"sheet2" );
spreadsheet.renameSheet( workbook,"sheetTwo",2 );