# GrapeCity.Documents.Excel.Workbook.ProcessTemplate

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate_" data-uid="GrapeCity.Documents.Excel.Workbook.ProcessTemplate*">ProcessTemplate Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate_" data-uid="GrapeCity.Documents.Excel.Workbook.ProcessTemplate*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate" data-uid="GrapeCity.Documents.Excel.Workbook.ProcessTemplate">ProcessTemplate()</h4>
<div class="markdown level1 summary"><p>Start to process the template with global 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 ProcessTemplate()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ProcessTemplate()</code></pre>
</div>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.ProcessTemplate.html#GrapeCity_Documents_Excel_IWorkbook_ProcessTemplate">IWorkbook.ProcessTemplate()</a></div>


<a id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate_" data-uid="GrapeCity.Documents.Excel.Workbook.ProcessTemplate*"></a>
<h4 id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate_System_Threading_CancellationToken_" data-uid="GrapeCity.Documents.Excel.Workbook.ProcessTemplate(System.Threading.CancellationToken)">ProcessTemplate(CancellationToken)</h4>
<div class="markdown level1 summary"><p>Start to process the template with global options and cancellation support.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ProcessTemplate(CancellationToken cancellationToken)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ProcessTemplate(cancellationToken As CancellationToken)</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.threading.cancellationtoken">CancellationToken</a></td>
      <td><span class="parametername">cancellationToken</span></td>
      <td><p>The token to monitor for cancellation requests.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="GrapeCity.Documents.Excel.IWorkbook.ProcessTemplate.html#GrapeCity_Documents_Excel_IWorkbook_ProcessTemplate_System_Threading_CancellationToken_">IWorkbook.ProcessTemplate(CancellationToken)</a></div>
<h5 id="GrapeCity_Documents_Excel_Workbook_ProcessTemplate_System_Threading_CancellationToken__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The caller must decide whether to accept the partially expanded template or revert to the previous state.
If the caller needs to revert to the previous state, it must serialize the workbook before calling this method,
then deserialize the workbook after canceling the operation.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.operationcanceledexception">OperationCanceledException</a></td>
      <td><p>Throws when the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a> was canceled.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
