NativeExcel2 for .Net Developer's Reference

IPageSetup.FitToPages Property

Gets or sets a value that indicates whether the worksheet is scaled for printing using Zoom property or FitToPagesWide and FitToPagesTall properties.

[Visual Basic]

Property Value

True if worksheet is scaled using FitToPagesWide and FitToPagesTall properties; False if worksheet is scaled using Zoom property.


This example causes to print worksheet one exactly one page tall and wide.

book.Worksheets[1].PageSetup.FitToPagesTall = 1;
book.Worksheets[1].PageSetup.FitToPagesWide = 1;
book.Worksheets[1].PageSetup.Zoom = 50;
book.Worksheets[1].PageSetup.FitToPages = true;
book.Worksheets(1).PageSetup.FitToPagesTall = 1
book.Worksheets(1).PageSetup.FitToPagesWide = 1
book.Worksheets(1).PageSetup.Zoom = 50
book.Worksheets(1).PageSetup.FitToPages = True
book->Worksheets->Item[1]->PageSetup->FitToPagesTall = 1;
book->Worksheets->Item[1]->PageSetup->FitToPagesWide = 1;
book->Worksheets->Item[1]->PageSetup->Zoom = 50;
book->Worksheets->Item[1]->PageSetup->FitToPages = true;

See Also

IPageSetup Interface | NativeExcel Namespace | FitToPagesWide Property | FitToPagesTall Property | Zoom Property