spreadsheetSetHeader

Adds a header to the specified worksheet.

spreadsheetSetHeader(spreadsheetObj, leftHeader, centerHeader, rightHeader) → returns void

Argument Reference

spreadsheetObj variableName
Required

The Excel spreadsheet object to which to add the header.

leftHeader string
Required

Adds the header in the left side of the worksheet.

centerHeader string
Required

Adds the header in the center of the worksheet.

rightHeader string
Required

Adds the header in the right side of the worksheet.

Examples
Sample code invoking the spreadsheetSetHeader function

Here,we've example to set the header for excel file.

<cfset bookDetail=SpreadsheetNew("student",false)>
<cfset SpreadSheetAddRow(bookDetail,"id,BookTitle,author")>
<cfset SpreadSheetAddRow(bookDetail,"1,Charlottes Web,E.B. White")>
<cfset spreadsheetSetHeader(bookDetail,"leftHeader","centerHeader","rightHeader")>
<cfset SpreadsheetWrite(bookDetail,expandPath("./bookDetail.xls"),true)>

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

Fork me on GitHub