Skip to main content

FreezeRows

Freezes the top row or rows of the current worksheet.

Syntax

expression.FreezeRows(count);

expression - A variable that represents a ApiFreezePanes class.

Parameters

NameRequired/OptionalData typeDefaultDescription
countOptionalNumber0Optional number of rows to freeze, or zero to unfreeze all rows.

Returns

This method doesn't return any data.

Example

This example freezes the the top row.

// How to freeze rows using their indices.

// Get freeze panes and freeze a row using its index.

let worksheet = Api.GetActiveSheet();
let freezePanes = worksheet.GetFreezePanes();
freezePanes.FreezeRows(1);