Adds a header to the specified worksheet.
spreadsheetSetHeader(spreadsheetObj, leftHeader, centerHeader, rightHeader)
→ returns void
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.