# FarPoint.Win.Spread.FpSpread.IsExcelFile

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_FpSpread_IsExcelFile_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile*">IsExcelFile Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_FpSpread_IsExcelFile_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelFile_System_String_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile(System.String)">IsExcelFile(string)</h4>
<div class="markdown level1 summary"><p>Opens the specified file and determines whether it meets the minimal requirements
to be considered an Excel file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool IsExcelFile(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelFile(fileName As String) 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.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>String that contains the path and file name</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>


<a id="FarPoint_Win_Spread_FpSpread_IsExcelFile_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelFile_System_String_FarPoint_Excel_ExcelWorkbookType__System_Boolean__" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile(System.String,FarPoint.Excel.ExcelWorkbookType@,System.Boolean@)">IsExcelFile(string, 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 structured storage file containing 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 IsExcelFile(string fileName, ref ExcelWorkbookType workbookType, out bool isEncrypt)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelFile(fileName As String, 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.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>Path and name of file</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>Returns the type of Excel workbook</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>Returns true the file is encrypted; false otherwise</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.io.filenotfoundexception">FileNotFoundException</a></td>
      <td><p>Specified file is not found</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>No file name is specified (or specified file name 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 file name is specified (or specified file name is empty)</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_FpSpread_IsExcelFile_" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_IsExcelFile_System_String_FarPoint_Excel_ExcelWorkbookType__" data-uid="FarPoint.Win.Spread.FpSpread.IsExcelFile(System.String,FarPoint.Excel.ExcelWorkbookType@)">IsExcelFile(string, 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 structured storage file 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 IsExcelFile(string fileName, ref ExcelWorkbookType workbookType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function IsExcelFile(fileName As String, 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.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>Path and name of file</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>Returns the type of Excel workbook</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.io.filenotfoundexception">FileNotFoundException</a></td>
      <td><p>Specified file is not found</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>No file name is specified (or specified file name 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 file name is specified (or specified file name is empty)</p>
</td>
    </tr>
  </tbody>
</table>
</div>
