# GrapeCity.Documents.Excel.Workbook.Open

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*">Open Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_String_System_String_GrapeCity_Documents_Excel_OpenOptions_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.String,System.String,GrapeCity.Documents.Excel.OpenOptions)">Open(string, string, OpenOptions)</h4>
<div class="markdown level1 summary"><p>Opens the specified excel file</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Use Open(string, OpenOptionsBase) instead.&quot;)]
public void Open(string fileName, string password = null, OpenOptions openOptions = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Use Open(string, OpenOptionsBase) instead.&quot;)&gt;
Public Sub Open(fileName As String, Optional password As String = Nothing, Optional openOptions As OpenOptions = Nothing)</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>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">password</span></td>
      <td><p>The password of the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenOptions.html">OpenOptions</a></td>
      <td><span class="parametername">openOptions</span></td>
      <td><p>Options for opening.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_String_System_String_GrapeCity_Documents_Excel_OpenOptions_">IWorkbook.Open(string, string, OpenOptions)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_String_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.String)">Open(string)</h4>
<div class="markdown level1 summary"><p>Opens the file with default options.
The file type is inferred from file extension.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(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="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>The specified file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_String_">IWorkbook.Open(string)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_String_GrapeCity_Documents_Excel_DeserializationOptions_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.String,GrapeCity.Documents.Excel.DeserializationOptions)">Open(string, DeserializationOptions)</h4>
<div class="markdown level1 summary"><p>Opens the json file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IList&lt;JsonError&gt; Open(string fileName, DeserializationOptions deserializationOptions)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Open(fileName As String, deserializationOptions As DeserializationOptions) As IList(Of JsonError)</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>The specified json file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.DeserializationOptions.html">DeserializationOptions</a></td>
      <td><span class="parametername">deserializationOptions</span></td>
      <td><p>The json deserialization options.</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.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="GrapeCity.Documents.Excel.JsonError.html">JsonError</a>&gt;</td>
      <td><p>The error list of the JSON</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_String_GrapeCity_Documents_Excel_DeserializationOptions_">IWorkbook.Open(string, DeserializationOptions)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_IO_Stream_System_String_GrapeCity_Documents_Excel_OpenOptions_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.IO.Stream,System.String,GrapeCity.Documents.Excel.OpenOptions)">Open(Stream, string, OpenOptions)</h4>
<div class="markdown level1 summary"><p>Opens the specified excel file stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Use Open(Stream, OpenOptionsBase) instead.&quot;)]
public void Open(Stream fileStream, string password = null, OpenOptions openOptions = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Use Open(Stream, OpenOptionsBase) instead.&quot;)&gt;
Public Sub Open(fileStream As Stream, Optional password As String = Nothing, Optional openOptions As OpenOptions = Nothing)</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">fileStream</span></td>
      <td><p>The file stream.</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>The password of the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenOptions.html">OpenOptions</a></td>
      <td><span class="parametername">openOptions</span></td>
      <td><p>Options for opening.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_IO_Stream_System_String_GrapeCity_Documents_Excel_OpenOptions_">IWorkbook.Open(Stream, string, OpenOptions)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_String_GrapeCity_Documents_Excel_OpenFileFormat_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.String,GrapeCity.Documents.Excel.OpenFileFormat)">Open(string, OpenFileFormat)</h4>
<div class="markdown level1 summary"><p>Opens the file with specified file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(string fileName, OpenFileFormat fileFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(fileName As String, fileFormat As OpenFileFormat)</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>The specified file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenFileFormat.html">OpenFileFormat</a></td>
      <td><span class="parametername">fileFormat</span></td>
      <td><p>The format of the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_String_GrapeCity_Documents_Excel_OpenFileFormat_">IWorkbook.Open(string, OpenFileFormat)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_IO_Stream_GrapeCity_Documents_Excel_OpenFileFormat_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.IO.Stream,GrapeCity.Documents.Excel.OpenFileFormat)">Open(Stream, OpenFileFormat)</h4>
<div class="markdown level1 summary"><p>Opens the stream with specified file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(Stream fileStream, OpenFileFormat fileFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(fileStream As Stream, fileFormat As OpenFileFormat)</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">fileStream</span></td>
      <td><p>The specified file stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenFileFormat.html">OpenFileFormat</a></td>
      <td><span class="parametername">fileFormat</span></td>
      <td><p>The format of the file stream.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_IO_Stream_GrapeCity_Documents_Excel_OpenFileFormat_">IWorkbook.Open(Stream, OpenFileFormat)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_IO_Stream_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.IO.Stream)">Open(Stream)</h4>
<div class="markdown level1 summary"><p>Opens the file stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(Stream fileStream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(fileStream 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="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">fileStream</span></td>
      <td><p>The specified file stream.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_IO_Stream_">IWorkbook.Open(Stream)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_String_GrapeCity_Documents_Excel_OpenOptionsBase_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.String,GrapeCity.Documents.Excel.OpenOptionsBase)">Open(string, OpenOptionsBase)</h4>
<div class="markdown level1 summary"><p>Opens the file with specified options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(string fileName, OpenOptionsBase options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(fileName As String, options As OpenOptionsBase)</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>The excel file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenOptionsBase.html">OpenOptionsBase</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The options of opening the file. Possible types:
<ul><li><a class="xref" href="GrapeCity.Documents.Excel.CsvOpenOptions.html">CsvOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.SjsOpenOptions.html">SjsOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsmOpenOptions.html">XlsmOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsxOpenOptions.html">XlsxOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XltxOpenOptions.html">XltxOpenOptions</a></li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_String_GrapeCity_Documents_Excel_OpenOptionsBase_">IWorkbook.Open(string, OpenOptionsBase)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Open_" data-uid="GrapeCity.Documents.Excel.Workbook.Open*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Open_System_IO_Stream_GrapeCity_Documents_Excel_OpenOptionsBase_" data-uid="GrapeCity.Documents.Excel.Workbook.Open(System.IO.Stream,GrapeCity.Documents.Excel.OpenOptionsBase)">Open(Stream, OpenOptionsBase)</h4>
<div class="markdown level1 summary"><p>Opens the stream with specified options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Open(Stream fileStream, OpenOptionsBase options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Open(fileStream As Stream, options As OpenOptionsBase)</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">fileStream</span></td>
      <td><p>The file stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.OpenOptionsBase.html">OpenOptionsBase</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The format of opening the file stream. Possible types:
<ul><li><a class="xref" href="GrapeCity.Documents.Excel.CsvOpenOptions.html">CsvOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.SjsOpenOptions.html">SjsOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsmOpenOptions.html">XlsmOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsxOpenOptions.html">XlsxOpenOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XltxOpenOptions.html">XltxOpenOptions</a></li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Open.html#GrapeCity_Documents_Excel_IWorkbook_Open_System_IO_Stream_GrapeCity_Documents_Excel_OpenOptionsBase_">IWorkbook.Open(Stream, OpenOptionsBase)</a></div>
</div>
