Freeze panes can only be applied to the first few rows or first few columns of a worksheet. The cell specified in {Worksheet.FreezePanes} is the first unfrozen cell; freeze panes will be applied to all rows above the cell and all columns to the left of the cell.
Example
Code Block
csharp
csharp
title
C#
//--- Get FreezePanes
Cell freezeCell = ws.FreezePanes;
//--- Set FreezePanes forrows1-5andcolumnsA,Bws.FreezePanes = ws.Cells["C5"];
Code Block
vb.net
vb.net
title
vb.net
'--- Get FreezePanes
Dim freezeCell As Cell = ws.FreezePanes
'--- Set FreezePanes forrows1-5andcolumnsA,Bws.FreezePanes = ws.Cells("C5");