# FarPoint.Win.Spread.FormatCells.TryGetNumberFormatCategory

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_FormatCells_TryGetNumberFormatCategory_" data-uid="FarPoint.Win.Spread.FormatCells.TryGetNumberFormatCategory*">TryGetNumberFormatCategory Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_FormatCells_TryGetNumberFormatCategory_" data-uid="FarPoint.Win.Spread.FormatCells.TryGetNumberFormatCategory*"></a>
<h4 id="FarPoint_Win_Spread_FormatCells_TryGetNumberFormatCategory_GrapeCity_Spreadsheet_NumberFormat_GrapeCity_Spreadsheet_IWorkbook_GrapeCity_Spreadsheet_PredefinedNumberFormats__" data-uid="FarPoint.Win.Spread.FormatCells.TryGetNumberFormatCategory(GrapeCity.Spreadsheet.NumberFormat,GrapeCity.Spreadsheet.IWorkbook,GrapeCity.Spreadsheet.PredefinedNumberFormats@)">TryGetNumberFormatCategory(NumberFormat, IWorkbook, out PredefinedNumberFormats)</h4>
<div class="markdown level1 summary"><p>Gets the category of the specified number format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool TryGetNumberFormatCategory(NumberFormat numberFormat, IWorkbook workbook, out PredefinedNumberFormats category)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function TryGetNumberFormatCategory(numberFormat As NumberFormat, workbook As IWorkbook, ByRef category As PredefinedNumberFormats) As Boolean</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="../GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.NumberFormat.html">NumberFormat</a></td>
      <td><span class="parametername">numberFormat</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="../GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a></td>
      <td><span class="parametername">workbook</span></td>
      <td><p>The current <a class="xref" href="../GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IWorkbook.html">IWorkbook</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.PredefinedNumberFormats.html">PredefinedNumberFormats</a></td>
      <td><span class="parametername">category</span></td>
      <td><p>The category of the number format.</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.boolean">bool</a></td>
      <td><p><code>true</code> if the number format belongs to predefined categories; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
