# FarPoint.Win.Spread.FpSpread.IsExcelStream

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_FpSpread_IsExcelStream_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream*">IsExcelStream Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_FpSpread_IsExcelStream_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelStream_System_IO_Stream_FarPoint_Excel_ExcelWorkbookType__" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream(System.IO.Stream,FarPoint.Excel.ExcelWorkbookType@)">IsExcelStream(Stream, ref ExcelWorkbookType)</h4>
<div class="markdown level1 summary"><p>Opens the specified file and determines whether it meets the minimal requirements<br>
to be considered a stream that contains an Excel workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool IsExcelStream(Stream stream, ref ExcelWorkbookType workbookType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelStream(stream As Stream, ByRef workbookType As ExcelWorkbookType) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>Stream</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Excel/FarPoint.Excel.ExcelWorkbookType.html">ExcelWorkbookType</a></td>
      <td><span class="parametername">workbookType</span></td>
      <td><p>Workbook type</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Boolean: true if it is an Excel file; false otherwise</p>
</td>
    </tr>
  </tbody>
</table>
<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.argumentnullexception">ArgumentNullException</a></td>
      <td><p>No stream specified or specified stream is null</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>No stream specified or specified stream is empty</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_FpSpread_IsExcelStream_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelStream_System_IO_Stream_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream(System.IO.Stream)">IsExcelStream(Stream)</h4>
<div class="markdown level1 summary"><p>Opens the specified file and determines whether it meets the minimal requirements<br>
to be considered an Excel-compatible stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool IsExcelStream(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelStream(stream As Stream) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>Stream</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Boolean: true if it is an Excel stream; false otherwise</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_FpSpread_IsExcelStream_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelStream_System_IO_Stream_FarPoint_Excel_ExcelWorkbookType__System_Boolean__" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelStream(System.IO.Stream,FarPoint.Excel.ExcelWorkbookType@,System.Boolean@)">IsExcelStream(Stream, ref ExcelWorkbookType, out bool)</h4>
<div class="markdown level1 summary"><p>Opens the specified file and determines whether it meets the minimal requirements<br>
to be considered a stream that contains an Excel workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool IsExcelStream(Stream stream, ref ExcelWorkbookType workbookType, out bool isEncrypt)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelStream(stream As Stream, ByRef workbookType As ExcelWorkbookType, ByRef isEncrypt As Boolean) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>Stream</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Excel/FarPoint.Excel.ExcelWorkbookType.html">ExcelWorkbookType</a></td>
      <td><span class="parametername">workbookType</span></td>
      <td><p>Workbook type</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isEncrypt</span></td>
      <td><p>isEncrypt</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Boolean: true if it is an Excel file; false otherwise</p>
</td>
    </tr>
  </tbody>
</table>
<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.argumentnullexception">ArgumentNullException</a></td>
      <td><p>No stream specified or specified stream is null</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>No stream specified or specified stream is empty</p>
</td>
    </tr>
  </tbody>
</table>
</div>
