# FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges*">GenerateFromCellRanges Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges*"></a>
<h4 id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_FarPoint_Win_Spread_SheetView_FarPoint_Win_Spread_Model_CellRange___System_Boolean_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges(FarPoint.Win.Spread.SheetView,FarPoint.Win.Spread.Model.CellRange[],System.Boolean)">GenerateFromCellRanges(SheetView, CellRange[], bool)</h4>
<div class="markdown level1 summary"><p>Generates from cell ranges.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GenerateFromCellRanges(SheetView sheetView, CellRange[] cellRanges, bool autoSwitch)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GenerateFromCellRanges(sheetView As SheetView, cellRanges As CellRange(), autoSwitch 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="FarPoint.Win.Spread.SheetView.html">SheetView</a></td>
      <td><span class="parametername">sheetView</span></td>
      <td><p>The sheet view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a>[]</td>
      <td><span class="parametername">cellRanges</span></td>
      <td><p>The cell ranges.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">autoSwitch</span></td>
      <td><p>if set to <code>true</code>, the processing will switch rows and columns automatically if  necessary.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges*"></a>
<h4 id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_FarPoint_Win_Spread_SheetView_FarPoint_Win_Spread_Model_CellRange_FarPoint_Win_Spread_Model_CellRange_FarPoint_Win_Spread_Model_CellRange_System_Boolean_System_Boolean_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges(FarPoint.Win.Spread.SheetView,FarPoint.Win.Spread.Model.CellRange,FarPoint.Win.Spread.Model.CellRange,FarPoint.Win.Spread.Model.CellRange,System.Boolean,System.Boolean)">GenerateFromCellRanges(SheetView, CellRange, CellRange, CellRange, bool, bool)</h4>
<div class="markdown level1 summary"><p>Generates from cell ranges.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GenerateFromCellRanges(SheetView sheetView, CellRange category, CellRange seriesName, CellRange data, bool autoSwitch, bool autoCreateCategory)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GenerateFromCellRanges(sheetView As SheetView, category As CellRange, seriesName As CellRange, data As CellRange, autoSwitch As Boolean, autoCreateCategory 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="FarPoint.Win.Spread.SheetView.html">SheetView</a></td>
      <td><span class="parametername">sheetView</span></td>
      <td><p>The sheet view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">category</span></td>
      <td><p>The category.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">seriesName</span></td>
      <td><p>Name of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">autoSwitch</span></td>
      <td><p>if set to <code>true</code>, the procesing will switch row and column automatically if it's necessary.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">autoCreateCategory</span></td>
      <td><p>if set to <code>true</code>, the generating process will auto detect and create category if the category cell range is NULL.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges*"></a>
<h4 id="FarPoint_Win_Spread_Chart_SpreadChart_GenerateFromCellRanges_FarPoint_Win_Spread_SheetView_FarPoint_Win_Spread_Model_CellRange_FarPoint_Win_Spread_Model_CellRange_FarPoint_Win_Spread_Model_CellRange_System_Boolean_" data-uid="FarPoint.Win.Spread.Chart.SpreadChart.GenerateFromCellRanges(FarPoint.Win.Spread.SheetView,FarPoint.Win.Spread.Model.CellRange,FarPoint.Win.Spread.Model.CellRange,FarPoint.Win.Spread.Model.CellRange,System.Boolean)">GenerateFromCellRanges(SheetView, CellRange, CellRange, CellRange, bool)</h4>
<div class="markdown level1 summary"><p>Generates from cell ranges.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GenerateFromCellRanges(SheetView sheetView, CellRange category, CellRange seriesName, CellRange data, bool autoSwitch)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GenerateFromCellRanges(sheetView As SheetView, category As CellRange, seriesName As CellRange, data As CellRange, autoSwitch 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="FarPoint.Win.Spread.SheetView.html">SheetView</a></td>
      <td><span class="parametername">sheetView</span></td>
      <td><p>The sheet view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">category</span></td>
      <td><p>The category.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">seriesName</span></td>
      <td><p>Name of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>The data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">autoSwitch</span></td>
      <td><p>if set to <code>true</code>, the procesing will switch row and column automatically if it's necessary.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
