NativeExcel2 for .Net Developer's Reference

IWorksheet.Zoom Property

Gets or sets the display size of the worksheet, as a percentage (100 equals normal size, 200 equals double size, and so on).

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

Property Value

Integer. The display size of the worksheet, as a percentage.

Remarks

This property affects only display size of the worksheet. Use the PageSetup.Zoom property to control the scale for printing.

Example

This example scales Sheet1 by 150 percent.

[C#]
book.Worksheets["Sheet1"].Zoom = 150;
[VisualBasic]
book.Worksheets("Sheet1").Zoom = 150
[C++]
book->Worksheets->Item[S"Sheet1"]->Zoom = 150;

See Also

IWorksheet Interface | NativeExcel Namespace | IPageSetup.Zoom Property