User Guide Cancel

SpreadsheetAddFreezePane

 

Note:

You can find the CFFiddle demo of this function and other spreadsheet functions as part of a project that is shared with you.

Click the button below to launch CFFiddle.

To copy the project in your workspace in CFFiddle, follow the steps below:

  1. Log in with your Gmail or Facebook credentials.
  2. Navigate to the project in the left pane.
  3. Once you make some changes in any cfm in the project, a pop up displays asking you to save the project.
  4. Give the project a suitable name and click Save.

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])

See also

SpreadsheetAddColumnSpreadsheetAddImageSpreadsheetAddRowSpreadsheetDeleteRowSpreadsheetDeleteRows

SpreadsheetFormatRowSpreadsheetFormatRowsSpreadsheetShiftRows

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);

Get help faster and easier

New user?