A function to add page breaks for rows and columns to a Spreadsheet Object.
spreadsheetAddPagebreaks(SpreadsheetObj, rowbreaks, colbreaks)
→ returns void
CF 11+ Here,we've example to break the excel using spreadsheetaddpagebreaks. It is supported only in adobe coldfusion.
<cfset Detail=SpreadsheetNew("student",false)>
<cfset SpreadSheetAddRow(Detail,"id,Name,Department,marks,average")>
<cfset SpreadSheetAddRow(Detail,"1,Dhar,CS,500,50")>
<cfset SpreadSheetAddRow(Detail,"2,DharC,EEE,600,85")>
<cfset SpreadSheetAddRow(Detail,"3,DharCf,EC,700,90")>
<cfset spreadsheetAddPagebreaks(Detail,'1,2', '3,4')>
<cfset SpreadsheetWrite(Detail,expandPath("./Detail.xls"),true)>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.