We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com


I was just looking at the documentation and wiki for FreezePanes and I couldn't figure out what the 3rd and 4th parameters do (freezedRows and freezedColumns). I finally figured out it was because I only needed to freeze the first row and first column. It seems there should be overloaded methods for the two available methods that allow you to leave off those two parameters.

It would be nice to be able to do this:


or this:


If you don't want to hide any rows or columns, the last two parameters have no impact (as long as you don't set them both to 0 and generate an exception):

sheet.FreezePanes(1,1,1,1) is equivalent to sheet.FreezePanes(1,1,50,200) is equivalent to sheet.FreezePanes(1,1,2000,188), etc.

This message was posted using Page2Forum from Freeze Panes - Aspose.Cells for .NET and Java


Thanks for your suggestion.

Ok, we may analyze your suggestion and get back to you soon.

Thank you.


The third and fourth param is not needed only when the start cell is "B2".

If you freeze panes from Row 3(one-based) or Column C, the third and fourth params are used to set how many visible rows and columns there are in the upper-left pane.So your suggested method is only for some special freeze cells.

If the third param is greater than the first param , we will use the first param to replace the third param.

If the fourth param is greater than the second param , we will use the second param to replace the fourth param.

Hi, Warren. Thanks for the reply. I think you may have missed my point. I've been using Excel since it first came out (and Lotus 1-2-3 before that, remember that one?), and it's incredibly rare that I've needed to hide rows and/or columns when freezing panes. I don't understand why the two independent functions are connected into one.

In Excel, if I want to freeze panes I just click in the top-left cell of the scrolling pane, C5 for instance, and choose freeze panes. That's the default behavior. I can then hide some rows or columns if I want, but I don't have to. What I would like is for your product to mimic that default behavior, so I could code sheet.FreezePanes("C5") instead of having to code sheet.FreezePanes("C5",4,2). The latter forces me to count how many rows and columns are above and to the left of cell C5. Granted, I could code sheet.FreezePanes("C5",9999,9999), but that's awfully sloppy.

The third and fourth param is not needed only when the start cell is "B2".

I've looked at the overload list for the FreezePanes method and it doesn't look like the 3rd and 4th parameters are optional. Are you saying they are?


Thanks for your details,

We will check your justifications and get back to you soon.

Thank you.

any news back on this? i've been having to roll through and count how many rows and columns are hidden so that i can set the 3rd and 4th parameters accordingly, and even then the results are not necessarily desirable. so just saying the row/column of where i want the frozen pane would be better - leaving off the 3rd and 4th parameters.

we've been hiding rows and columns ourselves per our specific business rules. if you set fewer rows or columns to show then how does Aspose.Cells determine which rows or columns to hide?

Hi All,

Please elaborate your problems/suggestions with screenshots and highlight them with red circles. I will add your requirements in a database and it will be fixed/implemented in coming releases.

I already have several (arbitrary) rows hidden between row 1 and row 10. i also have several (arbitrary) columns hidden. now i want to freeze at row 11, and no columns. i'm counting the number of hidden rows that i have, and am passing those in as the third parameter, then passing in 0 for the last parameter.

it would be far easier if i could just call FreezePanes for the location where i want the frozen pane to be without having to manually count the number of hidden rows that i have. if you edit a file using Excel and you choose to freeze panes, you are prompted for where you want to place the pane. you are not prompted for how many rows or columns you want to hide (which is done in a completely different manner). the Aspose FreezePanes method would be much more intuitive if it matched Excel's implementation (i.e. freezes the panes, but doesn't hide any rows or columns).


Thanks for using Aspose.Cells.

We are afraid, you will have to use the same workaround as you have discussed before. So this feature cannot implemented.

Anyway, if you still have any concerns, please feel free to share, we will look into them and then if possible implement or suggest you a workaround.

Besides, we have lately done some major enhancements and added new features in our product, so you should also download and give a try to latest offline demos of Aspose.Cells which you can find from theses links.

These demos can work with Visual Studio 2005, 2008 or 2010. Please read the readme.txt file before running the demos.