# GrapeCity.Spreadsheet.IFormatter.Format

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*">Format Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_DateTime_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.DateTime,GrapeCity.Spreadsheet.FormatOptions)">Format(DateTime, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified date to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(DateTime date, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format([date] As Date, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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.datetime">DateTime</a></td>
      <td><span class="parametername">date</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value indicates the date to format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_TimeSpan_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.TimeSpan,GrapeCity.Spreadsheet.FormatOptions)">Format(TimeSpan, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified number to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(TimeSpan timeSpan, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format(timeSpan As TimeSpan, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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.timespan">TimeSpan</a></td>
      <td><span class="parametername">timeSpan</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a> value indicates the time interval.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_Double_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.Double,GrapeCity.Spreadsheet.FormatOptions)">Format(double, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified number to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(double number, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format(number As Double, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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.double">double</a></td>
      <td><span class="parametername">number</span></td>
      <td><p>A double value indicates the number to format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_String_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.String,GrapeCity.Spreadsheet.FormatOptions)">Format(string, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified text to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(string text, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format(text As String, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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">text</span></td>
      <td><p>A string value indicates the text to format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_Boolean_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.Boolean,GrapeCity.Spreadsheet.FormatOptions)">Format(bool, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified boolean value to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(bool value, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format(value As Boolean, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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.boolean">bool</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicates the data to format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_IFormatter_Format_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format*"></a>
<h4 id="GrapeCity_Spreadsheet_IFormatter_Format_System_Object_GrapeCity_Spreadsheet_FormatOptions_" data-uid="GrapeCity.Spreadsheet.IFormatter.Format(System.Object,GrapeCity.Spreadsheet.FormatOptions)">Format(object, FormatOptions)</h4>
<div class="markdown level1 summary"><p>Formats the specified object to display text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">FormatResult Format(object obj, FormatOptions options = FormatOptions.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function Format(obj As Object, Optional options As FormatOptions = FormatOptions.None) As FormatResult</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.object">object</a></td>
      <td><span class="parametername">obj</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a> value indicates the data to format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.FormatOptions.html">FormatOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td><p>A value that specifies additional format 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="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a></td>
      <td><p>A <a class="xref" href="GrapeCity.Spreadsheet.FormatResult.html">FormatResult</a> value represents the formatting result.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
