Search code examples
c#epplus

How to set zoom level for excel sheet using epplus library?


It looks like very basic thing but i am not able to find property of epplus that allows me to set sheet zoom level. I have tried below property:

workSheet.PrinterSettings.Scale

But it did not set the zoom level of excel sheet. Looking forward for suggestions..


Solution

  • You need to access the property via the worksheet View like this:

    worksheet.View.ZoomScale = 250;
    

    The above would set it to a scale of 250% in this case.