workbook1.Worksheets[0].DisplayOptions.MagnificationInNormalView = 150;
This topic explains how to programmatically set the zoom level on a worksheet.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The worksheet allows you to control the magnification (zooming) level.
The following table explains briefly the configurable aspects of the worksheet’s zooming.
You can change the zoom for each worksheet independently using the MagnificationInNormalView
property on the DisplayOptions object. This property takes a value between 10 and 400.
The following table maps the desired configuration to the property settings that manage it.
The following code snippet demonstrates how to set the zoom level to 150%.
In C#:
workbook1.Worksheets[0].DisplayOptions.MagnificationInNormalView = 150;
The following topics provide additional information related to this topic.