spreadsheetAddPagebreaks

A function to add page breaks for rows and columns to a Spreadsheet Object.

spreadsheetAddPagebreaks(SpreadsheetObj, rowbreaks, colbreaks) → returns void

This function requires Adobe ColdFusion 11 and up.  Not supported on Lucee, etc.

Argument Reference

SpreadsheetObj any
Required

Excel spreadsheet object to apply page break to.

rowbreaks string
Required

Comma-delimited row numbers where the page breaks will be applied.

colbreaks string
Required

Comma-delimited column numbers where the page breaks will be applied.

Examples
Sample code invoking the spreadsheetAddPagebreaks function

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.

Fork me on GitHub