# GrapeCity.Documents.Excel.Themes.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Themes_Add_" data-uid="GrapeCity.Documents.Excel.Themes.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Themes_Add_" data-uid="GrapeCity.Documents.Excel.Themes.Add*"></a>
<h4 id="GrapeCity_Documents_Excel_Themes_Add_System_String_GrapeCity_Documents_Excel_ITheme_" data-uid="GrapeCity.Documents.Excel.Themes.Add(System.String,GrapeCity.Documents.Excel.ITheme)">Add(string, ITheme)</h4>
<div class="markdown level1 summary"><p>Creates a new theme based on the given theme;
if the given theme is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> (<code>Nothing</code> in Visual Basic), then the theme is based on the office theme.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ITheme Add(string themeName, ITheme baseTheme = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(themeName As String, Optional baseTheme As ITheme = Nothing) As ITheme</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">themeName</span></td>
      <td><p>The new theme name.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.ITheme.html">ITheme</a></td>
      <td><span class="parametername">baseTheme</span></td>
      <td><p>The theme name the theme is based on.</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.Documents.Excel.ITheme.html">ITheme</a></td>
      <td><p>Returns the new <a class="xref" href="GrapeCity.Documents.Excel.ITheme.html">ITheme</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Excel_Themes_Add_System_String_GrapeCity_Documents_Excel_ITheme__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is now obsolete. Theme constructor is now recommended.</p>
</div>
</div>
