Zoom in/out by programming
Worksheet provides the following methods that are used to zoom in/out the worksheet.
sheet.ZoomIn(); // +0.1f scale factor sheet.ZoomOut(); // -0.1f scale factor sheet.ZoomReset(); // reset to 1f scale factor
Set scale factor
Instead using the methods above, it is possible to change the worksheet scale directly:
Zoom in/out by mouse
By holding the Ctrl key and slide mouse wheel to zoom spreadsheet in or out. This is a native built-in behavior.
Disable zoom by mouse
By change worksheet settings
Behavior_MouseWheelToZoom to false can disable the zoom-by-mouse feature.
Learn more about built-in behaviors.