title: Zoom Down in EXCEL from an ASP.NET application
body: <p>Can anybody tell me how to set the zoom factor on an Excel sheet via a ASP.NET application. I believe the Excel Sheet object has a <strong>PageSetup.Zoom</strong> property which does not seem to be working. When I generate a report in Excel programatically through ASP.NET I get the zoom factor of all sheets in the workbook as 100%. </p>
  
  <p>Here is a code sample</p>
  
  <pre><code>oSheet.PageSetup.CenterHorizontally = true;
  oSheet.PageSetup.CenterVertically = true;
  oSheet.PageSetup.Orientation = XlPageOrientation.xlPortrait;
  oSheet.PageSetup.PaperSize = XlPaperSize.xlPaperA4;
  oSheet.PageSetup.Order = XlOrder.xlDownThenOver;
  oSheet.PageSetup.Zoom = 85; 
  </code></pre>
  
  <p>Another option is ActiveWindow.Zoom as generated by a macro but it is macro-specific. The whole point of asking this question is after the report has been generated the zoom factor of all the pages in the Excel workbook should be <strong>85%.</strong>
  Any inputs would be highly appreciated.</p>