Freeze Panes

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
pl00
Posts: 11
Joined: Sat Feb 09, 2013 8:44 pm

Freeze Panes

Post by pl00 »

I'm probably missing something quite obvious, but I can't see how to freeze the top (&/or left) pane(s).

A clue would be appreciated.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Freeze Panes

Post by larsa »

Hello

You can use the following code:

Code: Select all

var
XLS[0].Pane.TopRow := 5; 
XLS[0].Pane.SplitRowY := 4;
XLS[0].Pane.PaneType := ptFrozen;
Lars Arvidsson, Axolot Data
pl00
Posts: 11
Joined: Sat Feb 09, 2013 8:44 pm

Re: Freeze Panes

Post by pl00 »

While this works, there seems to be a minor bug.

When opening the spreadsheet, the top row is displayed twice. Scrolling the sheet fixes this and, if the workbook is saved, it displays correctly on next open.
Roman55
Posts: 10
Joined: Tue Mar 26, 2013 11:29 am

Re: Freeze Panes

Post by Roman55 »

Can't get frozen panes working for Excel 97. The code above does nothing.
There is also TXLSWorksheet.FreezePanes method, but it doesn't work either, and it causes document scroll failure.
Tested on version 5.10.16. Please help.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Freeze Panes

Post by larsa »

Hello

This is fixed in 5.10.18
Lars Arvidsson, Axolot Data
Post Reply