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

Free Support Forum - aspose.com

Scroll Position with Frozen Panes (ScrollRows?)

Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I’m having trouble scrolling my worksheet to the top while having frozen panes. Here’s the code snippet I’m using:

Workbook wb = new Workbook();


Worksheet ws = wb.Worksheets[0];

ws.Cells.ImportDataTable(dt, false, "A5");

ws.ActiveCell = "A5";

ws.FirstVisibleColumn = 0;

ws.FirstVisibleRow = 0;

Anyway, it’s not quite working. Attached is the XLS file I get. Notice that rows 1-4 are frozen, but the sheet is scrolled to row 77. If I open this in Excel, and press Ctrl + Home, it goes to the top of the data "A5" like I want the code to do.

I’ve download and tried the latest DLL 5.1.3.


Mike =:-)

Hi Mike,

Thanks for sharing us the file.

I can find the issue after an initial test. I have logged your issue into our issue tracking system with an id: CELLSNET-20226. We will figure it out soon.

Thank you.


After further investigation, I think you may try the following sample code, it will work fine with your template file.

Workbook wb = new Workbook(@“e:\test\FILE_TEST.xls”);
Worksheet ws = wb.Worksheets[0];
wb.Worksheets.ActiveSheetIndex = 0;
ws.ActiveCell = “A5”;
ws.FirstVisibleColumn = 0;
ws.FirstVisibleRow = 0;

PaneCollection panes = ws.GetPanes();
panes.FirstVisibleColumnOfRightPane = 0;
panes.FirstVisibleRowOfBottomPane = 4;


Thank you.

Thank you.

Good news: It works in the latest version of Aspose.Cells.

Bad news: My version of Aspose.Cells is and PaneCollection is not even an object. So, do I have to pay the upgrade price if I want this PaneCollection object?


Well, I am afraid, PaneCollection is new API, so you have to upgrade your subscription I think.

By the way, as you are using v4.6.0.3, could you try to find if there is an API named “Panes” or something like that. I am still not sure if this API exists in your mentioned version.

Thank you.