ApiFreezePanes

new ApiFreezePanes()

Class representing freeze panes.

Methods

Name Description
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.

FreezeColumns

Freezes the first column or columns of the current worksheet.

FreezeRows

Freezes the top row or rows of the current worksheet.

GetLocation

Returns a range that describes the frozen cells in the active worksheet view.

Unfreeze

Removes all frozen panes in the current worksheet.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFreezePanes = oWorksheet.GetFreezePanes();
Api.SetFreezePanesType("column");
oFreezePanes.FreezeColumns(1);
var oRange = oFreezePanes.GetLocation();
oWorksheet.GetRange("A1").SetValue("Location: ");
oWorksheet.GetRange("B1").SetValue(oRange.GetAddress());
builder.SaveFile("xlsx", "ApiFreezePane.xlsx");
builder.CloseFile();

Resulting document