# C1.WPF.Grid.Extensions.LoadExcel

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*">LoadExcel Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_String_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.String)">LoadExcel(FlexGrid, string)</h4>
<div class="markdown level1 summary"><p>Loads data from an Excel file into the specified grid synchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, fileName 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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>The path to the Excel file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_String_System_String_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.String,System.String)">LoadExcel(FlexGrid, string, string)</h4>
<div class="markdown level1 summary"><p>Loads data from an Excel file into the specified grid synchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, string fileName, string sheetName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, sheetName 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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>The path to the Excel 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">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_String_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.String,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, string, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads data from an Excel file into the specified grid synchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, string fileName, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>The path to the Excel file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_String_System_String_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.String,System.String,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, string, string, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads data from an Excel file into the specified grid synchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, string fileName, string sheetName, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, sheetName As String, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>The path to the Excel 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">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_String_C1_WPF_Grid_ExcelFileFormat_System_String_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.String,C1.WPF.Grid.ExcelFileFormat,System.String,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, string, ExcelFileFormat, string, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads data from an Excel file into the specified grid synchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, string fileName, ExcelFileFormat fileFormat, string sheetName, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, fileFormat As ExcelFileFormat, sheetName As String, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>The path to the Excel file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.ExcelFileFormat.html">ExcelFileFormat</a></td>
      <td><span class="parametername">fileFormat</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.ExcelFileFormat.html">ExcelFileFormat</a> file format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_IO_Stream_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.IO.Stream)">LoadExcel(FlexGrid, Stream)</h4>
<div class="markdown level1 summary"><p>Loads Excel data from <code class="paramref">stream</code> into the specified grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>A data <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_IO_Stream_System_String_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.IO.Stream,System.String)">LoadExcel(FlexGrid, Stream, string)</h4>
<div class="markdown level1 summary"><p>Loads Excel data from <code class="paramref">stream</code> into the specified grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, Stream stream, string sheetName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, sheetName 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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>A data <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_IO_Stream_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.IO.Stream,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, Stream, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads Excel data from <code class="paramref">stream</code> into the specified grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, Stream stream, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>A data <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_IO_Stream_System_String_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.IO.Stream,System.String,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, Stream, string, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads Excel data from <code class="paramref">stream</code> into the specified grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, Stream stream, string sheetName, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, sheetName As String, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>A data <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_Extensions_LoadExcel_" data-uid="C1.WPF.Grid.Extensions.LoadExcel*"></a>
<h4 id="C1_WPF_Grid_Extensions_LoadExcel_C1_WPF_Grid_FlexGrid_System_IO_Stream_C1_WPF_Grid_ExcelFileFormat_System_String_C1_WPF_Grid_LoadExcelOptions_" data-uid="C1.WPF.Grid.Extensions.LoadExcel(C1.WPF.Grid.FlexGrid,System.IO.Stream,C1.WPF.Grid.ExcelFileFormat,System.String,C1.WPF.Grid.LoadExcelOptions)">LoadExcel(FlexGrid, Stream, ExcelFileFormat, string, LoadExcelOptions)</h4>
<div class="markdown level1 summary"><p>Loads Excel data from <code class="paramref">stream</code> into the specified grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadExcel(this FlexGrid grid, Stream stream, ExcelFileFormat fileFormat, string sheetName, LoadExcelOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, fileFormat As ExcelFileFormat, sheetName As String, options As LoadExcelOptions)</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="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a></td>
      <td><span class="parametername">grid</span></td>
      <td><p>Instance of the <a class="xref" href="../C1.WPF.Grid/C1.WPF.Grid.FlexGrid.html">FlexGrid</a> to load the data into.</p>
</td>
    </tr>
    <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>A data <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.ExcelFileFormat.html">ExcelFileFormat</a></td>
      <td><span class="parametername">fileFormat</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.ExcelFileFormat.html">ExcelFileFormat</a> file format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">sheetName</span></td>
      <td><p>The name of the Excel sheet to load. If null, the first sheet will be loaded by default.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A <a class="xref" href="C1.WPF.Grid.LoadExcelOptions.html">LoadExcelOptions</a> loading options.</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.argumentexception">ArgumentException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
