# GrapeCity.Documents.Excel.IPivotFilter.PivotField

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_IPivotFilter_PivotField_" data-uid="GrapeCity.Documents.Excel.IPivotFilter.PivotField*">PivotField Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_IPivotFilter_PivotField_" data-uid="GrapeCity.Documents.Excel.IPivotFilter.PivotField*"></a>
<h4 id="GrapeCity_Documents_Excel_IPivotFilter_PivotField" data-uid="GrapeCity.Documents.Excel.IPivotFilter.PivotField">PivotField</h4>
<div class="markdown level1 summary"><p>Gets the label field that the pivot filter depends on.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">IPivotField PivotField { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">ReadOnly Property PivotField As IPivotField</code></pre>
</div>
<h5 id="GrapeCity_Documents_Excel_IPivotFilter_PivotField_examples">Examples</h5>
<pre><code class="lang-csharp">worksheet.Range["A1:B4"].Value = new object[,] {
    {"Product", "Amount"},
    {"Apple", 120},
    {"Banana", 90},
    {"Apricot", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotField productField = pivotTable.PivotFields["Product"];
productField.Orientation = PivotFieldOrientation.RowField;
IPivotFilter filter = productField.PivotFilters.Add(PivotFilterType.CaptionBeginsWith, "A");
IPivotField field = filter.PivotField;</code></pre>

</div>
