renameSheet - cfsimplicity/spreadsheet-cfml GitHub Wiki
Changes the name of the sheet specified by number to the given name.
renameSheet( workbook, sheetName, sheetNumber )
Required arguments
workbook
spreadsheet objectsheetName
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.
Note
Will throw an exception if you try to rename to an existing sheet name.
Example
spreadsheet = New spreadsheet();
workbook = spreadsheet.new(); // creates "sheet1" by default
spreadsheet.createSheet( workbook,"sheet2" );
spreadsheet.renameSheet( workbook,"sheetTwo",2 );