Create spreadsheet from given spreadsheet object

spreadsheetCreateSheet(spreadsheetObj, name) → returns void

Argument Reference

spreadsheetObj variableName

No Help Available

name string

No Help Available

Sample code invoking the spreadsheetCreateSheet function

The following example creates two sheets: CourseData and EvaluationSheet.

// 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);

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

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub