Is there an opportunity to freeze panes in an Excel sheet using TXLSReadWriteII4?
Markus
Freeze panes
Re: Freeze panes
Maybe nobody knows what I was asking for. In Excel you can freeze panes here:
https://www.dropbox.com/s/alcvvcj58ii3x ... ePanes.PNG
Markus
https://www.dropbox.com/s/alcvvcj58ii3x ... ePanes.PNG
Markus
-
- Posts: 13
- Joined: Tue Feb 13, 2007 8:47 am
- Location: West Sussex England
Re: Freeze panes
I think what you want is (something like) ...
Hope that helps
Code: Select all
// Fix the top rows for scrolling
CurrentSheet.Pane.PaneType := ptFrozen;
CurrentSheet.Pane.SplitColX := 1;
CurrentSheet.Pane.SplitRowY := 4;
CurrentSheet.Pane.LeftCol := 1;
CurrentSheet.Pane.TopRow := 4;
Joe Griffin
GerbilSoft Associates Limited
GerbilSoft Associates Limited
Re: Freeze panes
Sounds good, but causes nothing.
Is the something necessary to apply these changes?
Markus
Is the something necessary to apply these changes?
Markus
Re: Freeze panes
You have to add soFrozenPanes to the sheet options:
Code: Select all
CurrentSheet.Options := CurrentSheet.Options + [soFrozenPanes];
Re: Freeze panes
Ok, I did this (RADStudio 2010, C++ Builder):
But unfortunately there is no frozen pane in the result file.
Code: Select all
XLSReadWriteII41->Version = xvExcel2007;
XLSReadWriteII41->Sheets->Items[0]->Options = XLSReadWriteII41->Sheets->Items[0]->Options << soFrozenPanes;
XLSReadWriteII41->Filename = L"test.xlsx";
for(int i=0; i<=10; i++)
for(int j=0; j<=10; j++)
XLSReadWriteII41->Sheets->Items[0]->AsString[i][j] = L"Test[" + IntToStr(i) + L";" + IntToStr(j) + L"]";
XLSReadWriteII41->Sheets->Items[0]->Pane->PaneType = ptFrozen;
XLSReadWriteII41->Sheets->Items[0]->Pane->SplitColX = 1;
XLSReadWriteII41->Sheets->Items[0]->Pane->SplitRowY = 4;
XLSReadWriteII41->Sheets->Items[0]->Pane->LeftCol = 1;
XLSReadWriteII41->Sheets->Items[0]->Pane->TopRow = 4;
XLSReadWriteII41->Write();
Re: Freeze panes
axolot.com/components/xlsrwii20.htm wrote:The support for Excel 2007 files is right now limited to read/write cell values and formatting.