spreadsheetSetHeader

Adds a header to the specified worksheet.

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

spreadsheetSetHeader 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,auther")>
<cfset SpreadSheetAddRow(bookDetail,"1,Charlottes Web,E.B. White")>
<cfset spreadsheetSetHeader(bookDetail,"leftHeader","centerHeader","rightHeader")>
<cfset SpreadsheetWrite(bookDetail,expandPath("./bookDetail.xls"),true)>

Fork me on GitHub