# GrapeCity.Spreadsheet.Commands.Command.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Commands_Command__ctor_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor*">Command Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Commands_Command__ctor_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_Command__ctor" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor">Command()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Spreadsheet.Commands.Command.html">Command</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected Command()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Sub New()</code></pre>
</div>


<a id="GrapeCity_Spreadsheet_Commands_Command__ctor_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_Command__ctor_GrapeCity_Spreadsheet_IWorkbook_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor(GrapeCity.Spreadsheet.IWorkbook)">Command(IWorkbook)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Spreadsheet.Commands.Command.html">Command</a> class with the specified workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected Command(IWorkbook workbook)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Sub New(workbook As IWorkbook)</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.IWorkbook.html">IWorkbook</a></td>
      <td><span class="parametername">workbook</span></td>
      <td><p>The workbook which this command attached to.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_Commands_Command__ctor_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor*"></a>
<h4 id="GrapeCity_Spreadsheet_Commands_Command__ctor_GrapeCity_Spreadsheet_IWorksheet_" data-uid="GrapeCity.Spreadsheet.Commands.Command.#ctor(GrapeCity.Spreadsheet.IWorksheet)">Command(IWorksheet)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Spreadsheet.Commands.Command.html">Command</a> class with the specified workbook.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Command(IWorksheet worksheet)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(worksheet As IWorksheet)</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.IWorksheet.html">IWorksheet</a></td>
      <td><span class="parametername">worksheet</span></td>
      <td><p>The worksheet which this command attached to.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
