NativeExcel for .Net Developer's Reference

IPageSetup.FitToPagesWide Property

Gets or sets the number of pages wide the worksheet will be scaled to when it's printed.

[Visual Basic]
PropertyFitToPagesWideAsInteger
[C#]
intFitToPagesWide{get;set;}
[C++]
__propertyintget_FitToPagesWide();
__propertyvoidset_FitToPagesWide(int);
[JScript]
functiongetFitToPagesWide():int
functionsetFitToPagesWide(int);

Property Value

If this property is 0, the worksheet will be scaled according to the FitToPagesTall property. If the FitToPages property is false, the FitToPagesWide property is ignored and the Zoom property control how the worksheet is scaled.

Example

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

[C#]
book.Worksheets[1].PageSetup.FitToPagesTall = 1;
book.Worksheets[1].PageSetup.FitToPagesWide = 1;
[VisualBasic]
book.Worksheets(1).PageSetup.FitToPagesTall = 1
book.Worksheets(1).PageSetup.FitToPagesWide = 1
[C++]
book->Worksheets->Item[1]->PageSetup->FitToPagesTall = 1;
book->Worksheets->Item[1]->PageSetup->FitToPagesWide = 1;

See Also

IPageSetup Interface | NativeExcel Namespace | FitToPagesTall Property | Zoom Property