# C1.WPF.FlexGrid.C1FlexGrid.Save

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*">Save Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_StreamWriter_C1_WPF_FlexGrid_FileFormat_C1_WPF_FlexGrid_SaveOptions_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.IO.StreamWriter,C1.WPF.FlexGrid.FileFormat,C1.WPF.FlexGrid.SaveOptions)">Save(StreamWriter, FileFormat, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.streamwriter">StreamWriter</a>.</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(StreamWriter sw, FileFormat format, SaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(sw As StreamWriter, format As FileFormat, options As SaveOptions)</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.streamwriter">StreamWriter</a></td>
      <td><span class="parametername">sw</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.streamwriter">StreamWriter</a> where the contents will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat_System_Text_Encoding_C1_WPF_FlexGrid_SaveOptions_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.IO.Stream,C1.WPF.FlexGrid.FileFormat,System.Text.Encoding,C1.WPF.FlexGrid.SaveOptions)">Save(Stream, FileFormat, Encoding, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to a 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 stream, FileFormat format, Encoding encoding, SaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As FileFormat, encoding As Encoding, options As SaveOptions)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> where the contents will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.encoding">Encoding</a></td>
      <td><span class="parametername">encoding</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.encoding">Encoding</a> value that specifies the encoding for the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat_System_Text_Encoding_C1_WPF_FlexGrid_SaveOptions__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The caller is responsible for closing the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</div>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat_C1_WPF_FlexGrid_SaveOptions_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.IO.Stream,C1.WPF.FlexGrid.FileFormat,C1.WPF.FlexGrid.SaveOptions)">Save(Stream, FileFormat, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to an UTF8-encoded 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 stream, FileFormat format, SaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As FileFormat, options As SaveOptions)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> where the contents will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat_C1_WPF_FlexGrid_SaveOptions__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The caller is responsible for closing the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</div>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.IO.Stream,C1.WPF.FlexGrid.FileFormat)">Save(Stream, FileFormat)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to an UTF8-encoded 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 stream, FileFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As FileFormat)</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> where the contents will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_IO_Stream_C1_WPF_FlexGrid_FileFormat__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The caller is responsible for closing the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</div>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_String_C1_WPF_FlexGrid_FileFormat_System_Text_Encoding_C1_WPF_FlexGrid_SaveOptions_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.String,C1.WPF.FlexGrid.FileFormat,System.Text.Encoding,C1.WPF.FlexGrid.SaveOptions)">Save(string, FileFormat, Encoding, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to a file.</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, FileFormat format, Encoding encoding, SaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As FileFormat, encoding As Encoding, options As SaveOptions)</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>Name of the file to save.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.encoding">Encoding</a></td>
      <td><span class="parametername">encoding</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.encoding">Encoding</a> value that specifies the encoding for the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_String_C1_WPF_FlexGrid_FileFormat_C1_WPF_FlexGrid_SaveOptions_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.String,C1.WPF.FlexGrid.FileFormat,C1.WPF.FlexGrid.SaveOptions)">Save(string, FileFormat, SaveOptions)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to an UTF8-encoded file.</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, FileFormat format, SaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As FileFormat, options As SaveOptions)</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>Name of the file to save.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.SaveOptions.html">SaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_C1FlexGrid_Save_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save*"></a>
<h4 id="C1_WPF_FlexGrid_C1FlexGrid_Save_System_String_C1_WPF_FlexGrid_FileFormat_" data-uid="C1.WPF.FlexGrid.C1FlexGrid.Save(System.String,C1.WPF.FlexGrid.FileFormat)">Save(string, FileFormat)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the grid to an UTF8-encoded file.</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, FileFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As FileFormat)</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>Name of the file to save.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.FlexGrid.FileFormat.html">FileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
