We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set Freeze panes in Excel using C#,VB.NET?

This article explains how to set freeze panes in Excel using C#/VB.NET.

How to set freeze panes in Excel?

Rows and columns can be frozen using IRange.FreezePanes() method. To freeze the rows or columns one must call the freeze panes by the range with next column and row.

For example, when we need to freeze first row we need to select range “A2”. If we select range “B2”, then the first row and first column will be freeze in worksheet. So, we need to select the range next to the range that needs to be frozen.

To set a freeze pane, you need to follow the below steps.

Steps to set freeze panes

  1. Create a workbook.

 

  1. Select the range to create freeze pane. Create a freeze pane using IRange.FreezePanes() method.

 

  1. Save the workbook.

 

To know more about freeze panes, please refer the documentation.

Download complete sample

The following C#/VB.NET complete code snippet shows how to set freeze panes in Excel using XlsIO.

 

 

The following screenshot shows the output Excel document with freeze panes generated using XlsIO.

Article ID: Published Date: Last Revised Date: Platform: Control:
1940 04/30/2011 03/16/2018 Windows Forms XlsIO
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon