# GrapeCity.Documents.Excel.IWorksheetView.FitSelection

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IWorksheetView_FitSelection_" data-uid="GrapeCity.Documents.Excel.IWorksheetView.FitSelection*">FitSelection Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IWorksheetView_FitSelection_" data-uid="GrapeCity.Documents.Excel.IWorksheetView.FitSelection*"></a>
<h4 id="GrapeCity_Documents_Excel_IWorksheetView_FitSelection" data-uid="GrapeCity.Documents.Excel.IWorksheetView.FitSelection">FitSelection</h4>
<div class="markdown level1 summary"><p>Gets or sets whether the zoom is set to fit the selection.
Unlike Microsoft Excel Application, this option does not modify the value of the <a class="xref" href="GrapeCity.Documents.Excel.IWorksheetView.Zoom.html#GrapeCity_Documents_Excel_IWorksheetView_Zoom">Zoom</a> property.
This option is only supported for <a class="xref" href="GrapeCity.Documents.Excel.SheetType.html#GrapeCity_Documents_Excel_SheetType_Chart">Chart</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">bool FitSelection { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Property FitSelection As Boolean</code></pre>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
      <td><p>Thrown when this method is called with unsupported sheet types.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
