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. Image for the cookie policy date

Only vertical freeze

Hi Syncfusion,

I would like to freeze column 1 to 10. If I select a range by specifying the row and column index, XlsIO puts both vertical and horizontal freeze. I need only vertical freeze. How to put only the vertical freeze?

Thanks!


3 Replies

SR Sridhar Syncfusion Team February 22, 2011 07:09 AM UTC

Hi Ram,

The Freezepanes will apply to the whole worksheet not for any particular range of rows and columns.This is default in MSExcel.

The following code snippet to freeze panes vertically.

sheet.Range[1,1].FreezePanes();

To apply the freeze panes for the first column
sheet.Range[2,1].FreezePanes();

Pleae let us know if you have any queries.

Thanks,
Sridhar.S




RT Ram Thatikonda February 23, 2011 02:03 PM UTC

Hi Sridhar,

I couldn't see any difference with your line in the excel file -
sheet.Range[1,1].FreezePanes();

It looks like to have a horizontal freeze, the row index should be always 1 such as -
sheet.Range[1,10].FreezePanes();
This will put a horizontal freeze until the 9th column.

And for vertical freeze, the column index should be always 1 such as -
sheet.Range[10,1].FreezePanes();
This will put a vertical freeze until the 9th row.

Please correct me if I am wrong.

Thanks!





SR Sridhar Syncfusion Team February 24, 2011 08:49 AM UTC

Hi Ram,

Thanks for the update.

As said in your previous post, the freeze panes working fine. The Freeze panes are applied to the entire sheet of rows and columns if we apply the any row or coumn.

I have used the following code to freeze vertically for 1 to 10 columns.
sheet.Range[11,1].FreezePanes();

XlsIO supports these type of freeze panes only.

Please let us know if you have any further clarifications.

Thanks,
Sridhar.S



Loader.
Live Chat Icon For mobile
Up arrow icon