Whatever message this page gives is out now! Go check it out!
SpreadsheetRenameSheet( Object spreadsheet, String oldName, String newName)Name | Required | Type | Description |
spreadSheetObject | Yes | ExcelInfo | The Excel spreadsheet object where a sheet must be renamed. |
oldName | Yes | String | The sheet to be renamed. |
newName | Yes | String | The new name of the sheet. |
<cfscript>
// set the path of the file
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-source.xls";
// create the spreadsheet naming the first worksheet as Course
obj =SpreadsheetNew("Course")
// create the second worksheet
SpreadsheetCreateSheet (obj,"Marks");
// create the third worksheet
SpreadsheetCreateSheet (obj,"EvaluationSheet");
spreadsheetWrite(obj, "#theFile#", "", "yes", "no")
obj1 =SpreadsheetRead(#theFile#)
spreadsheetRenameSheet(obj1,"Marks","MarksRenamed")
writeDump(obj1)
writeOutput(obj1.SUMMARYINFO.SHEETNAMES)
</cfscript>