Page 1 of 1

woFitToPage

Posted: Wed Apr 07, 2010 3:23 pm
by pwest777
I am trying to use this option in C++ Builder...

XLS->Sheets->Items[0]->PrintSettings->FitHeight = 999;
XLS->Sheets->Items[0]->PrintSettings->FitWidth = 1;

XLS->Sheets->Items[0]->WorkspaceOptions << woFitToPage;

When I look at the Excel File the fit height = 999 and width = 1, but the "Fit To:" option is not selected... It is still set to the "Adjust To:" setting... Am I doing something wrong? I have tried to set the woFitToPage option before setting the FitHeight and FitWidth, but I still get the same results.

Also, does anyone know how to set the "Rows to repeat at top" on the Sheet Tab of the Page Setup?

Thank you.

pwest777