Description

A function to add page breaks for rows and columns.

Returns

Does not return a value.

Category

Microsoft Office Integration

Function syntax

SpreadSheetAddPagebreaks(Spreadsheetobj, rowbreaks, colbreaks )

History

ColdFusion 11: Added the function. 

Parameters

Parameter

Description

spreadsheetObj

The Excel spreadsheet object to which to add the column.

rowbreaks

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

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

Example

<cfset rowCount = 200>

<cfset colCount = 150>

<cfloop from="1" to="#colCount#" index="i">
<cfset val_arr[i] = "some random text row#i#">
</cfloop>

<cfset val_list = #ArrayToList(val_arr)#>
<cfset xlObj = spreadsheetNew("testsheet", true)>


<cfloop from="1" to="#rowCount#" index="r">
<cfset spreadsheetAddRow(xlObj, "#val_list#")>
</cfloop>

<cfset SpreadSheetAddPagebreaks(xlObj, "50,90", "4,9")>
<cfset SpreadSheetWrite(xlObj, "#Expandpath("./")#test_pagebreak.xlsx",true)>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy