Zoomscale Property

Mar 4, 2012 at 12:47 AM


I tried calling 


In order to attempt to set the default zoom.  I can't figure out what proper values for it should be and there don't seem to be any examples.  Any time I run it (with whatever values I choose), I get an error:

KeyNotFoundException - "The given key was not present in the dictionary"

Not sure at all what this means, but is Zoomscale currently supported?  And, if it is, how do I use it?

Mar 19, 2013 at 8:28 AM

This seems to be working in v3.1.2 at least, e.g.
using (var package = new ExcelPackage(new FileInfo(@"c:\file.xlsx"), true))
    ExcelWorksheet ws = package.Workbook.Worksheets[1];
    ws.View.ZoomScale = 78;
This sets the zoom level of the first worksheet to 78%.