SpreadsheetAddFreezePane

Description

Locks or freezes specific rows or columns in the worksheet.

Returns

Does not return a value.

Category

Microsoft Office Integration

Function syntax

SpreadsheetAddFreezePane(spreadsheetobj, freezcol, freezrow[, col, row])

History

ColdFusion 9: Added the function.

Parameters

Parameter

Description

spreadsheetobj

The Excel spreadsheet object to which to add the freeze pane.

freezcol

Specifies the column boundary of the freeze pane. The columns contained within the column boundary are frozen, while the rest of the worksheet scrolls.

freezrow

Specifies the row boundary of the freeze pane. The rows contained within the row boundary are frozen, while the rest of the worksheet scrolls.

col

This parameter is optional.

The column that should appear next to the freezcol that you specify. This parameter is useful in hiding data. For example, in a worksheet, you can specify column 5 to appear immediately after column 2, and hide column 3 and column 4.

row

This parameter is optional. The row that should appear next to the freezrow that you specify. This parameter is useful in hiding data. For example, in a worksheet, you can specify row 10 to appear immediately after row 7, and hide row 8 and row 9.

Usage

You can keep an area of the worksheet visible while scrolling to another area of the worksheet by freezing panes. When you freeze a pane, you lock or freeze specific rows and columns in the worksheet. The rows and columns that are frozen in the worksheet are indicated by a solid line.

Note: You cannot split the pane into two worksheet areas.

Example

The following example freezes the spreadsheet at column 3 and row 2 of the worksheet.

SpreadSheetAddFreezePane(SpreadsheetObj,3,2);
The following example freezes the spreadsheet at column 3 and row 2, and hides data in column 4 and rows 3 to 10.
SpreadSheetAddFreezePane(SpreadsheetObj,3,2,5,10);