NativeExcel for .Net Developer's Reference

IPageSetup.Zoom Property

Gets or sets a percentage (between 10 and 400 percent) by which the worksheet will be scaled for printing.

[Visual Basic]
PropertyZoomAsInteger
[C#]
intZoom{get;set;}
[C++]
__propertyintget_Zoom();
__propertyvoidset_Zoom(int);
[JScript]
functiongetZoom():int
functionsetZoom(int);

Property Value

If the FitToPages property is true, the Zoom property is ignored and the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. All scaling retains the aspect ratio of the original document.

Example

This example scales sheet one by 150 percent when the worksheet is printed.

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

See Also

IPageSetup Interface | NativeExcel Namespace | PageSetup Property | FitToPagesWide Property | FitToPagesTall Property | FitToPages Property