NativeExcel for .Net Developer's Reference

IWorksheet.FreezePanes Property

Gets or sets the value which specifies whether or not window panes are frozen for the specified worksheet.

[Visual Basic]
PropertyFreezePanesAsBoolean
[C#]
boolFreezePanes{get;set;}
[C++]
__propertyboolget_FreezePanes();
__propertyvoidset_FreezePanes(bool);
[JScript]
functiongetFreezePanes():bool
functionsetFreezePanes(bool);

Property Value

True True if window panes are frozen; otherwise, false.

Example

The following example freezes the first two rows and columns from scrolling.

[C#]
IWorksheet sheet = book.Worksheets[1];
sheet.SplitRow = 2;
sheet.SplitColumn = 2; 
sheet.FreezePanes = true;   
[VisualBasic]
Dim sheet As IWorksheet = book.Worksheets(1)
sheet.SplitRow = 2
sheet.SplitColumn = 2
sheet.FreezePanes = True
[C++]
IWorksheet* sheet = book->Worksheets->Item[1];
sheet->SplitRow = 2;
sheet->SplitColumn = 2; 
sheet->FreezePanes = true;   

See Also

IWorksheet Interface | NativeExcel Namespace | Split Property | SplitRow Property | SplitColumn Property