Skip to main content

FreezeAt

Sets the frozen cells in the active worksheet view. The range provided corresponds to the cells that will be frozen in the top- and left-most pane.

Syntax

expression.FreezeAt(frozenRange);

expression - A variable that represents a ApiFreezePanes class.

Parameters

NameRequired/OptionalData typeDefaultDescription
frozenRangeRequiredApiRange | StringA range that represents the cells to be frozen.

Returns

This method doesn't return any data.

Example

Freeze the specified range in top-and-left-most pane of the worksheet.

// How to freeze a specified range of panes in a spreadsheet.

// Get freeze panes and freeze the specified part in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let freezePanes = worksheet.GetFreezePanes();
let range = Api.GetRange('H2:K4');
freezePanes.FreezeAt(range);