# C1.WPF.Grid.FlexGrid.Save

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*">Save Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_String_C1_WPF_Grid_GridFileFormat_System_Text_Encoding_C1_WPF_Grid_GridSaveOptions_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.String,C1.WPF.Grid.GridFileFormat,System.Text.Encoding,C1.WPF.Grid.GridSaveOptions)">Save(string, GridFileFormat, Encoding, GridSaveOptions)</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, GridFileFormat format, Encoding encoding, GridSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As GridFileFormat, encoding As Encoding, options As GridSaveOptions)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</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.Grid.GridSaveOptions.html">GridSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_String_C1_WPF_Grid_GridFileFormat_C1_WPF_Grid_GridSaveOptions_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.String,C1.WPF.Grid.GridFileFormat,C1.WPF.Grid.GridSaveOptions)">Save(string, GridFileFormat, GridSaveOptions)</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, GridFileFormat format, GridSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As GridFileFormat, options As GridSaveOptions)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_String_C1_WPF_Grid_GridFileFormat_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.String,C1.WPF.Grid.GridFileFormat)">Save(string, GridFileFormat)</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, GridFileFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, format As GridFileFormat)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.IO.Stream,C1.WPF.Grid.GridFileFormat)">Save(Stream, GridFileFormat)</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, GridFileFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As GridFileFormat)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat__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_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat_C1_WPF_Grid_GridSaveOptions_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.IO.Stream,C1.WPF.Grid.GridFileFormat,C1.WPF.Grid.GridSaveOptions)">Save(Stream, GridFileFormat, GridSaveOptions)</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, GridFileFormat format, GridSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As GridFileFormat, options As GridSaveOptions)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat_C1_WPF_Grid_GridSaveOptions__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_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat_System_Text_Encoding_C1_WPF_Grid_GridSaveOptions_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.IO.Stream,C1.WPF.Grid.GridFileFormat,System.Text.Encoding,C1.WPF.Grid.GridSaveOptions)">Save(Stream, GridFileFormat, Encoding, GridSaveOptions)</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, GridFileFormat format, Encoding encoding, GridSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, format As GridFileFormat, encoding As Encoding, options As GridSaveOptions)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</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.Grid.GridSaveOptions.html">GridSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Grid_FlexGrid_Save_System_IO_Stream_C1_WPF_Grid_GridFileFormat_System_Text_Encoding_C1_WPF_Grid_GridSaveOptions__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_Grid_FlexGrid_Save_" data-uid="C1.WPF.Grid.FlexGrid.Save*"></a>
<h4 id="C1_WPF_Grid_FlexGrid_Save_System_IO_StreamWriter_C1_WPF_Grid_GridFileFormat_C1_WPF_Grid_GridSaveOptions_" data-uid="C1.WPF.Grid.FlexGrid.Save(System.IO.StreamWriter,C1.WPF.Grid.GridFileFormat,C1.WPF.Grid.GridSaveOptions)">Save(StreamWriter, GridFileFormat, GridSaveOptions)</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, GridFileFormat format, GridSaveOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(sw As StreamWriter, format As GridFileFormat, options As GridSaveOptions)</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.Grid.GridFileFormat.html">GridFileFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridFileFormat.html">GridFileFormat</a> value that specifies the format used to save the file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p><a class="xref" href="C1.WPF.Grid.GridSaveOptions.html">GridSaveOptions</a> value that specifies options to use when saving the file.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
