spreadsheetCreateSheet

Create spreadsheet from given spreadsheet object

spreadsheetCreateSheet(spreadsheetObj, name) → returns void

spreadsheetCreateSheet Argument Reference

spreadsheetObj
Required

No Help Available

name
Required

No Help Available

Examples sample code invoking the spreadsheetCreateSheet function


Tag Example

The following example creates two sheets: CourseData and EvaluationSheet.

<cfscript>
// Make a spreadsheet object
spreadsheet = spreadsheetNew("Sheet A");

// add a new sheet
spreadsheetCreateSheet(spreadsheet, "Sheet B");

// set the new sheet to be the active one
SpreadsheetSetActiveSheet(spreadsheet, "Sheet B");

// populate Sheet B
i = 1;
while (i < 10) {
    SpreadsheetSetCellValue(spreadsheet, "col #i#", 1, i);
    i++;
}

</cfscript>
<cfheader name="Content-Disposition" value="inline; filename=testFile.xls">
<cfcontent type="application/vnd.msexcel" variable="#SpreadSheetReadBinary(spreadsheet)#">

Fork me on GitHub