跳到主要内容

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.

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