# GrapeCity.Documents.Excel.Workbook.Save

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*">Save Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_String_System_String_GrapeCity_Documents_Excel_SaveOptions_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.String,System.String,GrapeCity.Documents.Excel.SaveOptions)">Save(string, string, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves data to 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 Save(string, SaveOptionsBase) instead.&quot;)]
public void Save(string fileName, string password = null, SaveOptions saveOptions = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Use Save(string, SaveOptionsBase) instead.&quot;)&gt;
Public Sub Save(fileName As String, Optional password As String = Nothing, Optional saveOptions As SaveOptions = 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.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">saveOptions</span></td>
      <td><p>Options for saving</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_String_System_String_GrapeCity_Documents_Excel_SaveOptions_">IWorkbook.Save(string, string, SaveOptions)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_String_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.String)">Save(string)</h4>
<div class="markdown level1 summary"><p>Saves the workbook to the disk.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Save(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(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 file name.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_String_">IWorkbook.Save(string)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_IO_Stream_System_String_GrapeCity_Documents_Excel_SaveOptions_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.IO.Stream,System.String,GrapeCity.Documents.Excel.SaveOptions)">Save(Stream, string, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves workbook to 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 Save(Stream, SaveOptionsBase) instead.&quot;)]
public void Save(Stream fileStream, string password = null, SaveOptions saveOptions = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Use Save(Stream, SaveOptionsBase) instead.&quot;)&gt;
Public Sub Save(fileStream As Stream, Optional password As String = Nothing, Optional saveOptions As SaveOptions = 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.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">saveOptions</span></td>
      <td><p>Options for saving</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_IO_Stream_System_String_GrapeCity_Documents_Excel_SaveOptions_">IWorkbook.Save(Stream, string, SaveOptions)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_IO_Stream_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.IO.Stream)">Save(Stream)</h4>
<div class="markdown level1 summary"><p>Saves the workbook to the 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 Save(Stream fileStream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(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 file stream.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_IO_Stream_">IWorkbook.Save(Stream)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_String_GrapeCity_Documents_Excel_SaveFileFormat_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.String,GrapeCity.Documents.Excel.SaveFileFormat)">Save(string, SaveFileFormat)</h4>
<div class="markdown level1 summary"><p>Saves workbook to 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 Save(string fileName, SaveFileFormat fileFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, fileFormat As SaveFileFormat)</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.SaveFileFormat.html">SaveFileFormat</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.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_String_GrapeCity_Documents_Excel_SaveFileFormat_">IWorkbook.Save(string, SaveFileFormat)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_IO_Stream_GrapeCity_Documents_Excel_SaveFileFormat_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.IO.Stream,GrapeCity.Documents.Excel.SaveFileFormat)">Save(Stream, SaveFileFormat)</h4>
<div class="markdown level1 summary"><p>Saves workbook to 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 Save(Stream fileStream, SaveFileFormat fileFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileStream As Stream, fileFormat As SaveFileFormat)</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.SaveFileFormat.html">SaveFileFormat</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.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_IO_Stream_GrapeCity_Documents_Excel_SaveFileFormat_">IWorkbook.Save(Stream, SaveFileFormat)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_String_GrapeCity_Documents_Excel_SaveOptionsBase_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.String,GrapeCity.Documents.Excel.SaveOptionsBase)">Save(string, SaveOptionsBase)</h4>
<div class="markdown level1 summary"><p>Saves workbook to 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 Save(string fileName, SaveOptionsBase options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, options As SaveOptionsBase)</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.SaveOptionsBase.html">SaveOptionsBase</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The options of saving the file. Possible types:
<ul><li><a class="xref" href="GrapeCity.Documents.Excel.CsvSaveOptions.html">CsvSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.HtmlSaveOptions.html">HtmlSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.PdfSaveOptions.html">PdfSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.SjsSaveOptions.html">SjsSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsmSaveOptions.html">XlsmSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsxSaveOptions.html">XlsxSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XltxSaveOptions.html">XltxSaveOptions</a></li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_String_GrapeCity_Documents_Excel_SaveOptionsBase_">IWorkbook.Save(string, SaveOptionsBase)</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_Save_" data-uid="GrapeCity.Documents.Excel.Workbook.Save*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_Save_System_IO_Stream_GrapeCity_Documents_Excel_SaveOptionsBase_" data-uid="GrapeCity.Documents.Excel.Workbook.Save(System.IO.Stream,GrapeCity.Documents.Excel.SaveOptionsBase)">Save(Stream, SaveOptionsBase)</h4>
<div class="markdown level1 summary"><p>Saves workbook to 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 Save(Stream fileStream, SaveOptionsBase options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileStream As Stream, options As SaveOptionsBase)</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.SaveOptionsBase.html">SaveOptionsBase</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>The options of saving the file stream. Possible types:
<ul><li><a class="xref" href="GrapeCity.Documents.Excel.CsvSaveOptions.html">CsvSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.HtmlSaveOptions.html">HtmlSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.PdfSaveOptions.html">PdfSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.SjsSaveOptions.html">SjsSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsmSaveOptions.html">XlsmSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XlsxSaveOptions.html">XlsxSaveOptions</a></li><li><a class="xref" href="GrapeCity.Documents.Excel.XltxSaveOptions.html">XltxSaveOptions</a></li></ul>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.Save.html#GrapeCity_Documents_Excel_IWorkbook_Save_System_IO_Stream_GrapeCity_Documents_Excel_SaveOptionsBase_">IWorkbook.Save(Stream, SaveOptionsBase)</a></div>
</div>
