# FarPoint.Win.Spread.FpSpread.GetExcelSheetNames

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames*">GetExcelSheetNames Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_System_IO_Stream_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames(System.IO.Stream)">GetExcelSheetNames(Stream)</h4>
<div class="markdown level1 summary"><p>Gets an array of sheet names from the specified Excel stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static string[] GetExcelSheetNames(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetExcelSheetNames(stream As Stream) As String()</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 that contains an Excel Compound Document File</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.string">string</a>[]</td>
      <td><p>An array of sheet names.</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_GetExcelSheetNames_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_System_IO_Stream_System_String_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames(System.IO.Stream,System.String)">GetExcelSheetNames(Stream, string)</h4>
<div class="markdown level1 summary"><p>Gets an array of sheet names from the specified Excel stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static string[] GetExcelSheetNames(Stream stream, string password)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetExcelSheetNames(stream As Stream, password As String) As String()</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 that contains an Excel Compound Document File</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">password</span></td>
      <td><p>File password</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.string">string</a>[]</td>
      <td><p>An array of sheet names.</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_GetExcelSheetNames_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_System_String_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames(System.String)">GetExcelSheetNames(string)</h4>
<div class="markdown level1 summary"><p>Gets an array of sheet names from the specified Excel-compatible file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static string[] GetExcelSheetNames(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetExcelSheetNames(fileName As String) As String()</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>
  </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.string">string</a>[]</td>
      <td><p>n array of sheet names.</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_GetExcelSheetNames_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames*"></a>
<h4 id="FarPoint_Win_Spread_FpSpread_GetExcelSheetNames_System_String_System_String_" data-uid="FarPoint.Win.Spread.FpSpread.GetExcelSheetNames(System.String,System.String)">GetExcelSheetNames(string, string)</h4>
<div class="markdown level1 summary"><p>Gets an array of sheet names from the specified Excel-compatible file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static string[] GetExcelSheetNames(string fileName, string password)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetExcelSheetNames(fileName As String, password As String) As String()</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="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">password</span></td>
      <td><p>Password of file</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.string">string</a>[]</td>
      <td><p>An array of sheet names.</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>
