# IPivotField

## Content

<div class="docapp-java-api-doc-main"><style>:not(h1, h2, h3, h4, h5, h6)>code,
:not(h1, h2, h3, h4, h5, h6)>tt {
    font-size: 14px;
    padding-top: 4px;
    margin-top: 8px;
    line-height: 1.4em;
}

.summary-table dt code {
    font-size: 14px;
    vertical-align: top;
    padding-top: 4px;
}

.tab {
    background-color: #0066FF;
    color: #ffffff;
    padding: 8px;
    width: 5em;
    font-weight: bold;
}

/*
 * Styles for page header and footer.
 */
.title {
    color: #2c4557;
    margin: 10px 0;
}

.sub-title {
    margin: 5px 0 0 0;
}

.header ul {
    margin: 0 0 15px 0;
    padding: 0;
}

.header ul li,
.footer ul li {
    list-style: none;
}

/*
 * Styles for headings.
 */
.summary h2,
.details h2,
h2,
.block-list h2 {
    padding: 0;
    margin: 15px 0;
}

.summary h3,
.details h3,
.summary .inherited-list h2 {
    background-color: var(--ds-product-color);
    color: #fff;
    border: 1px solid #d0d9e0;
    padding: 7px 5px;
}

.summary h3 a,
.details h3 a,
.summary .inherited-list h2 a {
    color: #fff !important;
}
/*
 * Styles for page layout containers.
 */
dl.notes>dt {
    font-size: 12px;
    font-weight: bold;
    margin: 10px 0 0 0;
    color: #4E4E4E;
}

dl.notes>dd {
    margin: 5px 10px 10px 0;
    font-size: 14px;
}

dl.name-value>dt {
    margin-left: 1px;
    font-size: 1.1em;
    display: inline;
    font-weight: bold;
}

dl.name-value>dd {
    margin: 0 0 0 1px;
    font-size: 1.1em;
    display: inline;
}

/*
 * Styles for lists.
 */
li.circle {
    list-style: circle;
}

ul.horizontal li {
    display: inline;
    font-size: 0.9em;
}

div.inheritance {
    margin: 0;
    padding: 0;
}

div.inheritance div.inheritance {
    margin-left: 2em;
}

ul.block-list,
ul.details-list,
ul.member-list,
ul.summary-list {
    margin: 10px 0 10px 0;
    padding: 0;
}

ul.block-list>li,
ul.details-list>li,
ul.member-list>li,
ul.summary-list>li {
    list-style: none;
    margin-bottom: 15px;
    line-height: 1.4;
}

.summary-table dl,
.summary-table dl dt,
.summary-table dl dd {
    margin-top: 0;
    margin-bottom: 1px;
}

ul.see-list,
ul.see-list-long {
    padding-left: 0;
    list-style: none;
}

ul.see-list li {
    display: inline;
}

ul.see-list li:not(:last-child):after,
ul.see-list-long li:not(:last-child):after {
    content: ", ";
    white-space: pre-wrap;
}

/*
 * Styles for tables.
 */
.summary-table,
.details-table {
    width: 100%;
    border-spacing: 0;
    border-left: 1px solid #EEE;
    border-right: 1px solid #EEE;
    border-bottom: 1px solid #EEE;
    padding: 0;
}

.caption {
    position: relative;
    text-align: left;
    background-repeat: no-repeat;
    color: #253441;
    font-weight: bold;
    clear: none;
    overflow: hidden;
    padding: 0;
    padding-top: 10px;
    padding-left: 1px;
    margin: 0;
    white-space: pre;
}

.caption a:link,
.caption a:visited {
    color: #1f389c;
}

.caption a:hover,
.caption a:active {
    color: #FFFFFF;
}

.caption span {
    white-space: nowrap;
    padding-top: 5px;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 7px;
    display: inline-block;
    background-color: var(--ds-product-color);
    color: #fff;
    border: none;
}

div.table-tabs {
    padding: 10px 0 0 1px;
    margin: 0;
}

div.table-tabs>button {
    border: none;
    cursor: pointer;
    padding: 5px 12px 7px 12px;
    font-weight: bold;
    margin-right: 3px;
}

div.table-tabs>button.active-table-tab {
    background: var(--ds-product-color);
    color: #fff;
}

div.table-tabs>button.table-tab {
    background: var(--ds-product-color);
    color: #FFFFFF;
    border-bottom: 1px solid #eee;
}

.two-column-summary {
    display: grid;
    grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
}

.three-column-summary {
    display: grid;
    grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto);
}

.four-column-summary {
    display: grid;
    grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto);
}

@media screen and (max-width: 600px) {
    .two-column-summary {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 800px) {
    .three-column-summary {
        display: grid;
        grid-template-columns: minmax(10%, max-content) minmax(25%, auto);
    }

    .three-column-summary .col-last {
        grid-column-end: span 2;
    }
}

@media screen and (max-width: 1000px) {
    .four-column-summary {
        display: grid;
        grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
    }
}

.summary-table>div,
.details-table>div {
    text-align: left;
    padding: 8px 3px 3px 7px;
}

.col-first,
.col-second,
.col-last,
.col-constructor-name,
.col-summary-item-name {
    vertical-align: top;
    padding-right: 0;
    padding-top: 8px;
    padding-bottom: 3px;
}

.table-header {
    background: var(--ds-product-color);
    color: #fff;
    font-weight: bold;
}

.col-first,
.col-first {
    font-size: 13px;
}

.col-second,
.col-second,
.col-last,
.col-constructor-name,
.col-summary-item-name,
.col-last {
    font-size: 13px;
}

.col-first,
.col-second,
.col-constructor-name {
    vertical-align: top;
    overflow: auto;
}

.col-last {
    white-space: normal;
}

.col-first a:link,
.col-first a:visited,
.col-second a:link,
.col-second a:visited,
.col-first a:link,
.col-first a:visited,
.col-second a:link,
.col-second a:visited,
.col-constructor-name a:link,
.col-constructor-name a:visited,
.col-summary-item-name a:link,
.col-summary-item-name a:visited,
.constant-values-container a:link,
.constant-values-container a:visited,
.all-classes-container a:link,
.all-classes-container a:visited,
.all-packages-container a:link,
.all-packages-container a:visited {
    font-weight: bold;
}

.table-sub-heading-color {
    background-color: #EEEEFF;
}

.even-row-color,
.even-row-color .table-header {
    background-color: #FFFFFF;
}

.odd-row-color,
.odd-row-color .table-header {
    background-color: #EEEEEF;
}

/*
 * Styles for contents.
 */
.deprecated-content {
    margin: 0;
    padding: 10px 0;
}

div.block {
    font-size: 14px;
}

.col-last div {
    padding-top: 0;
}

.col-last a {
    padding-bottom: 3px;
}

.module-signature,
.package-signature,
.type-signature,
.member-signature {
    font-size: 14px;
    margin: 14px 0;
    white-space: pre-wrap;
}

.module-signature,
.package-signature,
.type-signature {
    margin-top: 0;
}

.member-signature .type-parameters-long,
.member-signature .parameters,
.member-signature .exceptions {
    display: inline-block;
    vertical-align: top;
    white-space: pre;
}

.member-signature .type-parameters {
    white-space: normal;
}

/*
 * Styles for formatting effect.
 */
.source-line-no {
    color: green;
    padding: 0 30px 0 0;
}

h1.hidden {
    visibility: hidden;
    overflow: hidden;
    font-size: 10px;
}

.block {
    display: block;
    margin: 0 10px 5px 0;
    color: #474747;
}

.deprecated-label,
.descfrm-type-label,
.implementation-label,
.member-name-label,
.member-name-link,
.module-label-in-package,
.module-label-in-type,
.override-specify-label,
.package-label-in-type,
.package-hierarchy-label,
.type-name-label,
.type-name-link,
.search-tag-link,
.preview-label {
    font-weight: bold;
}

.deprecation-block {
    font-size: 14px;
    border-style: solid;
    border-width: thin;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    margin-right: 10px;
    display: inline-block;
}

.preview-block {
    font-size: 14px;
    border-style: solid;
    border-width: thin;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    margin-right: 10px;
    display: inline-block;
}

/*
 * Styles for user-provided tables.
 *
 * borderless:
 *      No borders, vertical margins, styled caption.
 *      This style is provided for use with existing doc comments.
 *      In general, borderless tables should not be used for layout purposes.
 *
 * plain:
 *      Plain borders around table and cells, vertical margins, styled caption.
 *      Best for small tables or for complex tables for tables with cells that span
 *      rows and columns, when the "striped" style does not work well.
 *
 * striped:
 *      Borders around the table and vertical borders between cells, striped rows,
 *      vertical margins, styled caption.
 *      Best for tables that have a header row, and a body containing a series of simple rows.
 */

table.borderless,
table.plain,
table.striped {
    margin-top: 10px;
    margin-bottom: 10px;
}

table.borderless>caption,
table.plain>caption,
table.striped>caption {
    font-weight: bold;
    font-size: smaller;
}

table.borderless th,
table.borderless td,
table.plain th,
table.plain td,
table.striped th,
table.striped td {
    padding: 2px 5px;
}

table.borderless,
table.borderless>thead>tr>th,
table.borderless>tbody>tr>th,
table.borderless>tr>th,
table.borderless>thead>tr>td,
table.borderless>tbody>tr>td,
table.borderless>tr>td {
    border: none;
}

table.borderless>thead>tr,
table.borderless>tbody>tr,
table.borderless>tr {
    background-color: transparent;
}

table.plain {
    border-collapse: collapse;
    border: 1px solid black;
}

table.plain>thead>tr,
table.plain>tbody tr,
table.plain>tr {
    background-color: transparent;
}

table.plain>thead>tr>th,
table.plain>tbody>tr>th,
table.plain>tr>th,
table.plain>thead>tr>td,
table.plain>tbody>tr>td,
table.plain>tr>td {
    border: 1px solid black;
}

table.striped {
    border-collapse: collapse;
    border: 1px solid black;
}

table.striped>thead {
    background-color: #E3E3E3;
}

table.striped>thead>tr>th,
table.striped>thead>tr>td {
    border: 1px solid black;
}

table.striped>tbody>tr:nth-child(even) {
    background-color: #EEE
}

table.striped>tbody>tr:nth-child(odd) {
    background-color: #FFF
}

table.striped>tbody>tr>th,
table.striped>tbody>tr>td {
    border-left: 1px solid black;
    border-right: 1px solid black;
}

table.striped>tbody>tr>th {
    font-weight: normal;
}
</style><h1>Interface IPivotField</h1>
<!-- ======== START OF CLASS DATA ======== -->

<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">IPivotField</span></div>
<div class="block">Represents a field in a PivotTable report. <p>An  <code>IPivotField</code> is a member of the <a href="IPivotFields.html" title="interface in com.grapecity.documents.excel"><code>IPivotFields</code></a> collection and describes how a source field is used in a PivotTable report, including hidden  fields. Use this interface to access field metadata, change field orientation,  configure sorting and filtering, and work with row, column, page, or data fields.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B5").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Fruit", 80},
     {"Vegetables", 95},
     {"Vegetables", 60}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 </code></pre></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div aria-orientation="horizontal" class="table-tabs" role="tablist"><button aria-controls="method-summary-table.tabpanel" aria-selected="true" class="active-table-tab" id="method-summary-table-tab0" onclick="show('method-summary-table', 'method-summary-table', 3)" onkeydown="switchTab(event)" role="tab" tabindex="0">All Methods</button><button aria-controls="method-summary-table.tabpanel" aria-selected="false" class="table-tab" id="method-summary-table-tab2" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" onkeydown="switchTab(event)" role="tab" tabindex="-1">Instance Methods</button><button aria-controls="method-summary-table.tabpanel" aria-selected="false" class="table-tab" id="method-summary-table-tab3" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" onkeydown="switchTab(event)" role="tab" tabindex="-1">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div aria-labelledby="method-summary-table-tab0" class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#autoSort(com.grapecity.documents.excel.SortOrder)">autoSort</a><wbr>(<a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a>&nbsp;Order)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Establishes automatic field-sorting rules for a PivotTable field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#autoSort(com.grapecity.documents.excel.SortOrder,java.lang.String)">autoSort</a><wbr>(<a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a>&nbsp;Order,
 <a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;Field)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Establishes automatic field-sorting rules for a PivotTable report.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#clearAllFilters()">clearAllFilters</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Deletes all filters currently applied to this PivotField.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#clearLabelFilter()">clearLabelFilter</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Clears all label filters or date filters from this pivot field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#clearManualFilter()">clearManualFilter</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Clears manual filtering from the PivotField.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#clearValueFilter()">clearValueFilter</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Clears all value filters from this pivot field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getAllItemsVisible()">getAllItemsVisible</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether all items in the PivotField are visible.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getAutoSortField()">getAutoSortField</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the name of the data field used to sort this PivotTable field automatically.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getAutoSortOrder()">getAutoSortOrder</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the automatic sort order of this PivotTable field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getBaseField()">getBaseField</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the name of the base field used for a custom calculation.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getBaseItem()">getBaseItem</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the item in the base field for a custom calculation.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ICalculatedItems.html" title="interface in com.grapecity.documents.excel">ICalculatedItems</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getCalculatedItems()">getCalculatedItems</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the collection of calculated items for this  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel">PivotFieldCalculation</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getCalculation()">getCalculation</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets a  <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that represents the type of calculation performed by the specified field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getCurrentPage()">getCurrentPage</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the index of the current page item displayed for the page field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getDragToColumn()">getDragToColumn</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the specified field can be dragged to the column position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getDragToData()">getDragToData</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the specified field can be dragged to the data position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getDragToHide()">getDragToHide</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the field can be hidden by being dragged off the PivotTable report.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getDragToPage()">getDragToPage</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the field can be dragged to the page position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getDragToRow()">getDragToRow</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the field can be dragged to the row position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getEnableMultiplePageItems()">getEnableMultiplePageItems</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether the field can have multiple items selected in the page field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getFormula()">getFormula</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the formula of the PivotTable field in A1-style notation and in the language of the macro.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel">ConsolidationFunction</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getFunction()">getFunction</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the summary function used by this PivotTable field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getLayoutBlankLine()">getLayoutBlankLine</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether a blank row is inserted after this row field in a PivotTable report.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getLayoutCompactRow()">getLayoutCompactRow</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether this PivotField uses compact row layout when it is placed in the row area.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="LayoutFormType.html" title="enum class in com.grapecity.documents.excel">LayoutFormType</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getLayoutForm()">getLayoutForm</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the way the specified PivotTable items appear.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="SubtotalLocationType.html" title="enum class in com.grapecity.documents.excel">SubtotalLocationType</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getLayoutSubtotalLocation()">getLayoutSubtotalLocation</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the position of the PivotTable field subtotals in relation to the specified field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getName()">getName</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the name of the object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getNumberFormat()">getNumberFormat</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the number format code for the pivot field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel">PivotFieldOrientation</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getOrientation()">getOrientation</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the location of the field in the specified PivotTable report.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="IPivotFilters.html" title="interface in com.grapecity.documents.excel">IPivotFilters</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getPivotFilters()">getPivotFilters</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the pivot filter collection for this  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="IPivotItems.html" title="interface in com.grapecity.documents.excel">IPivotItems</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getPivotItems()">getPivotItems</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the collection of all visible and hidden items in this PivotTable field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getPosition()">getPosition</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the position of the field among the fields in its current orientation.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getRepeatLabels()">getRepeatLabels</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether item labels are repeated in the PivotTable for the specified  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getShowAllItems()">getShowAllItems</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets whether all items in the PivotTable report are displayed, even if they do not contain summary data.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getSourceName()">getSourceName</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the field name as it appears in the original source data.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/EnumSet.html" title="class or interface in java.util">EnumSet</a>&lt;<a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel">SubtotalType</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#getSubtotals()">getSubtotals</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the combination of subtotal types currently shown for this PivotField.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#group(com.grapecity.documents.excel.PivotFieldCustomGroupOptions)">group</a><wbr>(<a href="PivotFieldCustomGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldCustomGroupOptions</a>&nbsp;options)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a custom group from PivotItems in the PivotField.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#group(com.grapecity.documents.excel.PivotFieldDateGroupOptions)">group</a><wbr>(<a href="PivotFieldDateGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldDateGroupOptions</a>&nbsp;options)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Groups the PivotField by date or time units.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#group(com.grapecity.documents.excel.PivotFieldNumberGroupOptions)">group</a><wbr>(<a href="PivotFieldNumberGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldNumberGroupOptions</a>&nbsp;options)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Groups the PivotField into numeric ranges.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setBaseField(java.lang.String)">setBaseField</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the name of the base field used for a custom calculation.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setBaseItem(java.lang.String)">setBaseItem</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the item in the base field for a custom calculation.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setCalculation(com.grapecity.documents.excel.PivotFieldCalculation)">setCalculation</a><wbr>(<a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel">PivotFieldCalculation</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets a  <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that specifies how the data field is calculated in the PivotTable.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setCurrentPage(int)">setCurrentPage</a><wbr>(int&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the index of the current page item displayed for the page field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setDragToColumn(boolean)">setDragToColumn</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the specified field can be dragged to the column position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setDragToData(boolean)">setDragToData</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the specified field can be dragged to the data position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setDragToHide(boolean)">setDragToHide</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the field can be hidden by being dragged off the PivotTable report.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setDragToPage(boolean)">setDragToPage</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the field can be dragged to the page position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setDragToRow(boolean)">setDragToRow</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the field can be dragged to the row position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setEnableMultiplePageItems(boolean)">setEnableMultiplePageItems</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether the field can have multiple items selected in the page field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setFormula(java.lang.String)">setFormula</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the formula of the PivotTable field in A1-style notation and in the language of the macro.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setFunction(com.grapecity.documents.excel.ConsolidationFunction)">setFunction</a><wbr>(<a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel">ConsolidationFunction</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the function used to summarize the PivotTable field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setLayoutBlankLine(boolean)">setLayoutBlankLine</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether a blank row is inserted after this row field in a PivotTable report.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setLayoutCompactRow(boolean)">setLayoutCompactRow</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether this PivotField uses compact row layout when it is placed in the row area.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setLayoutForm(com.grapecity.documents.excel.LayoutFormType)">setLayoutForm</a><wbr>(<a href="LayoutFormType.html" title="enum class in com.grapecity.documents.excel">LayoutFormType</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the way the specified PivotTable items appear, in table format or in outline format.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setLayoutSubtotalLocation(com.grapecity.documents.excel.SubtotalLocationType)">setLayoutSubtotalLocation</a><wbr>(<a href="SubtotalLocationType.html" title="enum class in com.grapecity.documents.excel">SubtotalLocationType</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets where subtotals are displayed for this PivotTable field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setName(java.lang.String)">setName</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the name of the object.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setNumberFormat(java.lang.String)">setNumberFormat</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the number format code for the pivot field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setOrientation(com.grapecity.documents.excel.PivotFieldOrientation)">setOrientation</a><wbr>(<a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel">PivotFieldOrientation</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the location of the field in the specified PivotTable report.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setPosition(int)">setPosition</a><wbr>(int&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the position of the field among the fields in its current orientation.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setRepeatLabels(boolean)">setRepeatLabels</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether item labels are repeated in the PivotTable for the specified  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setShowAllItems(boolean)">setShowAllItems</a><wbr>(boolean&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets whether all items in the PivotTable report are displayed, even if they do not contain summary data.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#setSubtotals(java.util.EnumSet)">setSubtotals</a><wbr>(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/EnumSet.html" title="class or interface in java.util">EnumSet</a>&lt;<a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel">SubtotalType</a>&gt;&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the combination of subtotal types currently shown for this PivotField.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a class="member-name-link" href="#ungroup()">ungroup</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Removes grouping from the pivot field.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getAllItemsVisible()">
<h3>getAllItemsVisible</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getAllItemsVisible</span>()</div>
<div class="block">Gets whether all items in the PivotField are visible. <p>Returns  <code>false</code> when manual filtering has been applied by hiding one or more items. Use  <a href="#clearManualFilter()"><code>clearManualFilter()</code></a> to restore visibility to all items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Example Speaker", 4270},
     {"Example Camera", 8239},
     {"Example Appliance", 617}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "PivotTable1");
 IPivotField productField = pivotTable.getPivotFields().get("Product");
 productField.setOrientation(PivotFieldOrientation.RowField);
 productField.getPivotItems().get("Example Camera").setVisible(false);
 boolean allItemsVisible = productField.getAllItemsVisible();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if no manual filtering is applied and all items in the field are visible; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getAutoSortField()">
<h3>getAutoSortField</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getAutoSortField</span>()</div>
<div class="block">Gets the name of the data field used to sort this PivotTable field automatically. <p>If automatic sorting is configured by  <a href="#autoSort(com.grapecity.documents.excel.SortOrder,java.lang.String)"><code>autoSort(SortOrder,String)</code></a>,  this method returns the sort key field name that was specified for that rule.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Product", "Region", "Amount"},
     {"Apple", "East", 120},
     {"Orange", "West", 80},
     {"Apple", "West", 150},
     {"Orange", "East", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField regionField = pivotTable.getPivotFields().get("Region");
 regionField.setOrientation(PivotFieldOrientation.RowField);
 IPivotField amountField = pivotTable.getPivotFields().get("Amount");
 pivotTable.addDataField(amountField, "Sum of Amount", ConsolidationFunction.Sum);
 regionField.autoSort(SortOrder.Descending, amountField.getSourceName());
 String autoSortField = regionField.getAutoSortField();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The name of the data field used for automatic sorting.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getAutoSortOrder()">
<h3>getAutoSortOrder</h3>
<div class="member-signature"><span class="return-type"><a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a></span>&nbsp;<span class="element-name">getAutoSortOrder</span>()</div>
<div class="block">Gets the automatic sort order of this PivotTable field. <p>If automatic sorting is configured by  <a href="#autoSort(com.grapecity.documents.excel.SortOrder)"><code>autoSort(SortOrder)</code></a> or <a href="#autoSort(com.grapecity.documents.excel.SortOrder,java.lang.String)"><code>autoSort(SortOrder,String)</code></a>, this method returns the  <a href="SortOrder.html" title="enum class in com.grapecity.documents.excel"><code>SortOrder</code></a> applied to the field.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Product", "Region", "Amount"},
     {"Apple", "East", 120},
     {"Orange", "West", 80},
     {"Apple", "West", 150},
     {"Orange", "East", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField regionField = pivotTable.getPivotFields().get("Region");
 regionField.setOrientation(PivotFieldOrientation.RowField);
 regionField.autoSort(SortOrder.Descending);
 SortOrder autoSortOrder = regionField.getAutoSortOrder();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The automatic sort order of the PivotTable field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBaseField()">
<h3>getBaseField</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getBaseField</span>()</div>
<div class="block">Gets the name of the base field used for a custom calculation. <p>This property is valid only for data fields. Use this property together with  <a href="#getCalculation()"><code>getCalculation()</code></a> when the data field is configured to show values by a custom calculation such as  <a href="PivotFieldCalculation.html#PercentOf"><code>PivotFieldCalculation.PercentOf</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 dataField.setBaseField("Country");
 String baseField = dataField.getBaseField();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The name of the base field used for the custom calculation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setBaseField(java.lang.String)">
<h3>setBaseField</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setBaseField</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</span></div>
<div class="block">Sets the name of the base field used for a custom calculation. <p>This property is valid only for data fields. Use this property together with  <a href="#getCalculation()"><code>getCalculation()</code></a> when the data field is configured to show values by a custom calculation such as  <a href="PivotFieldCalculation.html#PercentOf"><code>PivotFieldCalculation.PercentOf</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 dataField.setBaseField("Country");
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The name of the base field used for the custom calculation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBaseItem()">
<h3>getBaseItem</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getBaseItem</span>()</div>
<div class="block">Gets the item in the base field for a custom calculation. <p>This property is valid only for data fields. Use this property together with  <a href="#getBaseField()"><code>getBaseField()</code></a> and <a href="#getCalculation()"><code>getCalculation()</code></a> to determine which item in the base field is used by a custom calculation such as  <a href="PivotFieldCalculation.html#PercentOf"><code>PivotFieldCalculation.PercentOf</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 dataField.setBaseField("Country");
 dataField.setBaseItem("Australia");
 String baseItem = dataField.getBaseItem();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The item name in the base field that is used for the custom calculation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setBaseItem(java.lang.String)">
<h3>setBaseItem</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setBaseItem</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</span></div>
<div class="block">Sets the item in the base field for a custom calculation. <p>This property is valid only for data fields. Use this property together with  <a href="#getBaseField()"><code>getBaseField()</code></a> and <a href="#getCalculation()"><code>getCalculation()</code></a> to determine which item in the base field is used by a custom calculation such as  <a href="PivotFieldCalculation.html#PercentOf"><code>PivotFieldCalculation.PercentOf</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 dataField.setBaseField("Country");
 dataField.setBaseItem("Australia");
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The item name in the base field that is used for the custom calculation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCalculation()">
<h3>getCalculation</h3>
<div class="member-signature"><span class="return-type"><a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel">PivotFieldCalculation</a></span>&nbsp;<span class="element-name">getCalculation</span>()</div>
<div class="block">Gets a  <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that represents the type of calculation performed by the specified field.<p>This property is valid only for data fields.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 PivotFieldCalculation calculation = dataField.getCalculation();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>A <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that indicates the type of calculation performed by the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setCalculation(com.grapecity.documents.excel.PivotFieldCalculation)">
<h3>setCalculation</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setCalculation</span><wbr><span class="parameters">(<a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel">PivotFieldCalculation</a>&nbsp;value)</span></div>
<div class="block">Sets a  <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that specifies how the data field is calculated in the PivotTable.<p>This property is valid only for data fields. Use it to change the data field from the default calculation to a custom calculation such as  <a href="PivotFieldCalculation.html#PercentOf"><code>PivotFieldCalculation.PercentOf</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Product", "Country", "Amount"},
     {"Bike", "Australia", 100},
     {"Bike", "Canada", 80}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Country").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 IPivotField dataField = pivotTable.getDataFields().get("Sum of Amount");
 dataField.setCalculation(PivotFieldCalculation.PercentOf);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The <a href="PivotFieldCalculation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldCalculation</code></a> value that specifies the calculation type for the data field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCurrentPage()">
<h3>getCurrentPage</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getCurrentPage</span>()</div>
<div class="block">Gets the index of the current page item displayed for the page field. <p>This method is valid only for page fields. The returned index is zero-based.  A value of  <code>-1</code> indicates that the page field is showing <code>All</code> or multiple items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Region", "Amount"},
     {"East", 100},
     {"West", 200},
     {"East", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField pageField = pivotTable.getPivotFields().get("Region");
 pageField.setOrientation(PivotFieldOrientation.PageField);
 int currentPage = pageField.getCurrentPage();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The zero-based index of the current page item for the page field, or <code>-1</code> if the page field is showing <code>All</code> or multiple items.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setCurrentPage(int)">
<h3>setCurrentPage</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setCurrentPage</span><wbr><span class="parameters">(int&nbsp;value)</span></div>
<div class="block">Sets the index of the current page item displayed for the page field. <p>This method is valid only for page fields. The returned index is zero-based.  A value of  <code>-1</code> indicates that the page field is showing <code>All</code> or multiple items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Region", "Amount"},
     {"East", 100},
     {"West", 200},
     {"East", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField pageField = pivotTable.getPivotFields().get("Region");
 pageField.setOrientation(PivotFieldOrientation.PageField);
 pageField.setCurrentPage(0);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The zero-based index of the current page item for the page field, or <code>-1</code> if the page field is showing <code>All</code> or multiple items.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDragToColumn()">
<h3>getDragToColumn</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getDragToColumn</span>()</div>
<div class="block">Gets whether the specified field can be dragged to the column position. <p>This property indicates whether the field can be moved into the column area of a PivotTable report.  The default value is  <code>true</code>. Use  <a href="#setDragToColumn(boolean)"><code>setDragToColumn(boolean)</code></a> to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setDragToColumn(false);
 boolean canDragToColumn = field.getDragToColumn();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can be dragged to the column position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDragToColumn(boolean)">
<h3>setDragToColumn</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setDragToColumn</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the specified field can be dragged to the column position. <p>This property indicates whether the field can be moved into the column area of a PivotTable report.  The default value is  <code>true</code>. Use this method to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setDragToColumn(false);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can be dragged to the column position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDragToData()">
<h3>getDragToData</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getDragToData</span>()</div>
<div class="block">Gets whether the specified field can be dragged to the data position. <p>This property indicates whether the field can be moved into the data area of a PivotTable report.  The default value is  <code>true</code>. Use  <a href="#setDragToData(boolean)"><code>setDragToData(boolean)</code></a> to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Amount");
 field.setDragToData(false);
 boolean canDragToData = field.getDragToData();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can be dragged to the data position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDragToData(boolean)">
<h3>setDragToData</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setDragToData</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the specified field can be dragged to the data position. <p>This property indicates whether the field can be moved into the data area of a PivotTable report.  The default value is  <code>true</code>. Use this method to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Amount");
 field.setDragToData(false);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can be dragged to the data position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDragToHide()">
<h3>getDragToHide</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getDragToHide</span>()</div>
<div class="block">Gets whether the field can be hidden by being dragged off the PivotTable report. <p>This property indicates whether users can remove the field from the PivotTable report by dragging it away.  The default value is  <code>true</code>. Use  <a href="#setDragToHide(boolean)"><code>setDragToHide(boolean)</code></a> to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setDragToHide(false);
 boolean canDragToHide = field.getDragToHide();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can be hidden by being dragged off the PivotTable report; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDragToHide(boolean)">
<h3>setDragToHide</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setDragToHide</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the field can be hidden by being dragged off the PivotTable report. <p>This property indicates whether users can remove the field from the PivotTable report by dragging it away.  The default value is  <code>true</code>. Use this method to change this setting.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setDragToHide(false);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can be hidden by being dragged off the PivotTable report; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDragToPage()">
<h3>getDragToPage</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getDragToPage</span>()</div>
<div class="block">Gets whether the field can be dragged to the page position. <p>The default value is  <code>true</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Region");
 field.setDragToPage(false);
 boolean canDragToPage = field.getDragToPage();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can be dragged to the page position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDragToPage(boolean)">
<h3>setDragToPage</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setDragToPage</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the field can be dragged to the page position. <p>The default value is  <code>true</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Region");
 field.setDragToPage(false);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can be dragged to the page position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDragToRow()">
<h3>getDragToRow</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getDragToRow</span>()</div>
<div class="block">Gets whether the field can be dragged to the row position. <p>This property determines whether the field is allowed to be moved to the row area  in a PivotTable. The default value is  <code>true</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Region");
 boolean canDragToRow = field.getDragToRow();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can be dragged to the row position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDragToRow(boolean)">
<h3>setDragToRow</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setDragToRow</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the field can be dragged to the row position. <p>This property determines whether the field is allowed to be moved to the row area  in a PivotTable. The default value is  <code>true</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 100},
     {"West", "Pear", 200},
     {"East", "Pear", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Region");
 field.setDragToRow(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can be dragged to the row position; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getEnableMultiplePageItems()">
<h3>getEnableMultiplePageItems</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getEnableMultiplePageItems</span>()</div>
<div class="block">Gets whether the field can have multiple items selected in the page field. <p>This property applies to PivotTable fields that are placed in the page area.  The default value is  <code>false</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Date", "Amount"},
     {"2024-01", 120},
     {"2024-02", 150},
     {"2024-03", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField pageField = pivotTable.getPivotFields().get("Date");
 pageField.setOrientation(PivotFieldOrientation.PageField);
 boolean allowMultipleItems = pageField.getEnableMultiplePageItems();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the field can have multiple items selected in the page field; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setEnableMultiplePageItems(boolean)">
<h3>setEnableMultiplePageItems</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setEnableMultiplePageItems</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether the field can have multiple items selected in the page field. <p>This property applies to PivotTable fields that are placed in the page area.  The default value is  <code>false</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Date", "Amount"},
     {"2024-01", 120},
     {"2024-02", 150},
     {"2024-03", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField pageField = pivotTable.getPivotFields().get("Date");
 pageField.setOrientation(PivotFieldOrientation.PageField);
 pageField.setEnableMultiplePageItems(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the field can have multiple items selected in the page field; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormula()">
<h3>getFormula</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getFormula</span>()</div>
<div class="block">Gets the formula of the PivotTable field in A1-style notation and in the language of the macro. <p>This property returns the formula text associated with the field.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Banana", 200},
     {"Orange", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getCalculatedFields().add("TotalAmount", "=Amount*2");
 String formula = field.getFormula();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The formula string in A1-style notation and in the language of the macro. Returns  <code>null</code> if no formula is associated with the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setFormula(java.lang.String)">
<h3>setFormula</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setFormula</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</span></div>
<div class="block">Sets the formula of the PivotTable field in A1-style notation and in the language of the macro. <p>This property Sets the formula text associated with the field.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Banana", 200},
     {"Orange", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getCalculatedFields().add("TotalAmount", "=Amount*2");
 field.setFormula("=Amount*3");
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The formula string in A1-style notation and in the language of the macro. Set  <code>null</code> if no formula is associated with the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFunction()">
<h3>getFunction</h3>
<div class="member-signature"><span class="return-type"><a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel">ConsolidationFunction</a></span>&nbsp;<span class="element-name">getFunction</span>()</div>
<div class="block">Gets the summary function used by this PivotTable field. <p>This property applies to data fields only. Use it to determine whether the field  summarizes source values by functions such as sum, count, or average. See  <a href="#setFunction(com.grapecity.documents.excel.ConsolidationFunction)"><code>setFunction(ConsolidationFunction)</code></a> to change the summary function.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 10},
     {"Fruit", 20},
     {"Drink", 5}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField dataField = pivotTable.addDataField(pivotTable.getPivotFields().get("Amount"), "Sum of Amount", ConsolidationFunction.Sum);
 ConsolidationFunction function = dataField.getFunction();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The <a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel"><code>ConsolidationFunction</code></a> used to summarize the PivotTable field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setFunction(com.grapecity.documents.excel.ConsolidationFunction)">
<h3>setFunction</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setFunction</span><wbr><span class="parameters">(<a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel">ConsolidationFunction</a>&nbsp;value)</span></div>
<div class="block">Sets the function used to summarize the PivotTable field. <p>This method applies to data fields only. Use a  <a href="ConsolidationFunction.html" title="enum class in com.grapecity.documents.excel"><code>ConsolidationFunction</code></a> value such as <a href="ConsolidationFunction.html#Sum"><code>ConsolidationFunction.Sum</code></a>,  <a href="ConsolidationFunction.html#Count"><code>ConsolidationFunction.Count</code></a>,  or  <a href="ConsolidationFunction.html#Average"><code>ConsolidationFunction.Average</code></a> to control how the field values are aggregated.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Fruit", 80},
     {"Drink", 50}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 pivotTable.getDataFields().get("Sum of Amount").setFunction(ConsolidationFunction.Average);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The consolidation function used to summarize the PivotTable data field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLayoutBlankLine()">
<h3>getLayoutBlankLine</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getLayoutBlankLine</span>()</div>
<div class="block">Gets whether a blank row is inserted after this row field in a PivotTable report. <p>This property applies to PivotFields placed in the row area of a PivotTable. The default value is  <code>false</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Apple", 200},
     {"Banana", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"));
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutBlankLine(true);
 boolean blankLine = field.getLayoutBlankLine();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if a blank row is inserted after this row field in the PivotTable report; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLayoutBlankLine(boolean)">
<h3>setLayoutBlankLine</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setLayoutBlankLine</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether a blank row is inserted after this row field in a PivotTable report. <p>This property applies to PivotFields placed in the row area of a PivotTable. The default value is  <code>false</code>.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Apple", 200},
     {"Banana", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"));
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutBlankLine(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if a blank row is inserted after this row field in the PivotTable report; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLayoutCompactRow()">
<h3>getLayoutCompactRow</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getLayoutCompactRow</span>()</div>
<div class="block">Gets whether this PivotField uses compact row layout when it is placed in the row area. <p>When this property is  <code>true</code>, items from multiple row PivotFields can be displayed in a single column.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 80},
     {"Vegetables", "Carrot", 60},
     {"Vegetables", "Celery", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Category").setOrientation(PivotFieldOrientation.RowField);
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutCompactRow(true);
 boolean compactRow = field.getLayoutCompactRow();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the PivotField is displayed in compact row layout when rows are selected; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLayoutCompactRow(boolean)">
<h3>setLayoutCompactRow</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setLayoutCompactRow</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether this PivotField uses compact row layout when it is placed in the row area. <p>When this property is  <code>true</code>, items from multiple row PivotFields can be displayed in a single column.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 80},
     {"Vegetables", "Carrot", 60},
     {"Vegetables", "Celery", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 pivotTable.getPivotFields().get("Category").setOrientation(PivotFieldOrientation.RowField);
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutCompactRow(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if the PivotField is displayed in compact row layout when rows are selected; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLayoutForm()">
<h3>getLayoutForm</h3>
<div class="member-signature"><span class="return-type"><a href="LayoutFormType.html" title="enum class in com.grapecity.documents.excel">LayoutFormType</a></span>&nbsp;<span class="element-name">getLayoutForm</span>()</div>
<div class="block">Gets the way the specified PivotTable items appear. <p>Use this property to determine whether the field is displayed in table format  or outline format.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Beverages", 100},
     {"Beverages", 200},
     {"Snacks", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutForm(LayoutFormType.Outline);
 LayoutFormType layoutForm = field.getLayoutForm();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The layout form of the PivotTable field, such as <a href="LayoutFormType.html#Tabular"><code>LayoutFormType.Tabular</code></a> or <a href="LayoutFormType.html#Outline"><code>LayoutFormType.Outline</code></a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLayoutForm(com.grapecity.documents.excel.LayoutFormType)">
<h3>setLayoutForm</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setLayoutForm</span><wbr><span class="parameters">(<a href="LayoutFormType.html" title="enum class in com.grapecity.documents.excel">LayoutFormType</a>&nbsp;value)</span></div>
<div class="block">Sets the way the specified PivotTable items appear, in table format or in outline format. <p>Use  <a href="LayoutFormType.html#Tabular"><code>LayoutFormType.Tabular</code></a> to display the field in tabular form or <a href="LayoutFormType.html#Outline"><code>LayoutFormType.Outline</code></a> to display it in outline form.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Fruit", 80},
     {"Vegetables", 95}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutForm(LayoutFormType.Outline);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The layout form to apply to the PivotTable field, such as <a href="LayoutFormType.html#Tabular"><code>LayoutFormType.Tabular</code></a> or <a href="LayoutFormType.html#Outline"><code>LayoutFormType.Outline</code></a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLayoutSubtotalLocation()">
<h3>getLayoutSubtotalLocation</h3>
<div class="member-signature"><span class="return-type"><a href="SubtotalLocationType.html" title="enum class in com.grapecity.documents.excel">SubtotalLocationType</a></span>&nbsp;<span class="element-name">getLayoutSubtotalLocation</span>()</div>
<div class="block">Gets the position of the PivotTable field subtotals in relation to the specified field. <p>Use this method to determine whether subtotals for the field are displayed above or below the field items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Beverages", 100},
     {"Beverages", 200},
     {"Snacks", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutSubtotalLocation(SubtotalLocationType.Bottom);
 SubtotalLocationType location = field.getLayoutSubtotalLocation();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>A <a href="SubtotalLocationType.html" title="enum class in com.grapecity.documents.excel"><code>SubtotalLocationType</code></a> value that indicates whether subtotals are displayed above or below the specified field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLayoutSubtotalLocation(com.grapecity.documents.excel.SubtotalLocationType)">
<h3>setLayoutSubtotalLocation</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setLayoutSubtotalLocation</span><wbr><span class="parameters">(<a href="SubtotalLocationType.html" title="enum class in com.grapecity.documents.excel">SubtotalLocationType</a>&nbsp;value)</span></div>
<div class="block">Sets where subtotals are displayed for this PivotTable field. <p>Use  <a href="SubtotalLocationType.html#Top"><code>SubtotalLocationType.Top</code></a> to display subtotals above the field items, or  <a href="SubtotalLocationType.html#Bottom"><code>SubtotalLocationType.Bottom</code></a> to display them below the field items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Beverages", 100},
     {"Beverages", 200},
     {"Snacks", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutSubtotalLocation(SubtotalLocationType.Bottom);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The subtotal location for the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getName()">
<h3>getName</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getName</span>()</div>
<div class="block">Gets the name of the object. <p>Use this method to retrieve the current name of a field in a PivotTable report.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Drink", 50},
     {"Fruit", 80}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 String name = field.getName();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The name of the object.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setName(java.lang.String)">
<h3>setName</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setName</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</span></div>
<div class="block">Sets the name of the object. <p>Use this method to set the name of a field in a PivotTable report.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Drink", 50},
     {"Fruit", 80}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setName("Product Category");
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The name of the object.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getNumberFormat()">
<h3>getNumberFormat</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getNumberFormat</span>()</div>
<div class="block">Gets the number format code for the pivot field. <p>The returned string corresponds to the format code assigned by  <a href="#setNumberFormat(java.lang.String)"><code>setNumberFormat(String)</code></a> and is used to display the field's values in the PivotTable report.</p>
<pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 1200},
     {"Fruit", 800},
     {"Vegetables", 600}
 };
 worksheet.getRange("A1:B4").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField amountField = pivotTable.getPivotFields().get("Amount");
 amountField.setOrientation(PivotFieldOrientation.DataField);
 amountField.setNumberFormat("$#,##0.00");
 String numberFormat = amountField.getNumberFormat();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The number format code for the pivot field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setNumberFormat(java.lang.String)">
<h3>setNumberFormat</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setNumberFormat</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;value)</span></div>
<div class="block">Sets the number format code for the pivot field.
 <pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 1200},
     {"Fruit", 800},
     {"Vegetables", 600}
 };
 worksheet.getRange("A1:B4").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField amountField = pivotTable.getPivotFields().get("Amount");
 amountField.setOrientation(PivotFieldOrientation.DataField);
 amountField.setNumberFormat("$#,##0.00");
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The number format code for the pivot field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getOrientation()">
<h3>getOrientation</h3>
<div class="member-signature"><span class="return-type"><a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel">PivotFieldOrientation</a></span>&nbsp;<span class="element-name">getOrientation</span>()</div>
<div class="block">Gets the location of the field in the specified PivotTable report. <p>Use this method to determine whether the field is currently placed in the row,  column, page, data, or hidden area of the PivotTable.</p>
<pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Product", "Category", "Amount"},
     {"Apple", "Fruit", 100},
     {"Pear", "Fruit", 200}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "pivotTable1");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 PivotFieldOrientation orientation = field.getOrientation();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The <a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldOrientation</code></a> value that indicates the field location in the PivotTable report.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setOrientation(com.grapecity.documents.excel.PivotFieldOrientation)">
<h3>setOrientation</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setOrientation</span><wbr><span class="parameters">(<a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel">PivotFieldOrientation</a>&nbsp;value)</span></div>
<div class="block">Sets the location of the field in the specified PivotTable report. <p>Use this method to place the field in a row, column, page, or data area of a PivotTable.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 200}
 };
 worksheet.getRange("A1:C3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField pivotField = pivotTable.getPivotFields().get("Category");
 pivotField.setOrientation(PivotFieldOrientation.RowField);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The <a href="PivotFieldOrientation.html" title="enum class in com.grapecity.documents.excel"><code>PivotFieldOrientation</code></a> that specifies where the field is placed in the PivotTable report.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPosition()">
<h3>getPosition</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getPosition</span>()</div>
<div class="block">Gets the position of the field among the fields in its current orientation. <p>The position determines the order of the field within its orientation area,  such as row fields, column fields, page fields, or data fields.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 80},
     {"Snacks", "Cookie", 60}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setPosition(0);
 int position = field.getPosition();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The zero-based position of the field within its current orientation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setPosition(int)">
<h3>setPosition</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setPosition</span><wbr><span class="parameters">(int&nbsp;value)</span></div>
<div class="block">Sets the position of the field among the fields in its current orientation. <p>The position determines the order of the field within its orientation area,  such as row fields, column fields, page fields, or data fields.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 80},
     {"Snacks", "Cookie", 60}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setPosition(0);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The zero-based position of the field within its current orientation.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRepeatLabels()">
<h3>getRepeatLabels</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getRepeatLabels</span>()</div>
<div class="block">Gets whether item labels are repeated in the PivotTable for the specified  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>. <p>Use this property to determine whether repeated item labels are shown for the field in the PivotTable layout.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Product"},
     {"Fruit", "Apple"},
     {"Fruit", "Orange"},
     {"Drink", "Tea"}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"));
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setRepeatLabels(true);
 boolean repeatLabels = field.getRepeatLabels();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if item labels are repeated; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setRepeatLabels(boolean)">
<h3>setRepeatLabels</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setRepeatLabels</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether item labels are repeated in the PivotTable for the specified  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>. <p>Use this property to set whether repeated item labels are shown for the field in the PivotTable layout.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Product"},
     {"Fruit", "Apple"},
     {"Fruit", "Orange"},
     {"Drink", "Tea"}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"));
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setRepeatLabels(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if item labels are repeated; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getShowAllItems()">
<h3>getShowAllItems</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">getShowAllItems</span>()</div>
<div class="block">Gets whether all items in the PivotTable report are displayed, even if they do not contain summary data. <p>The default value is  <code>false</code>. When this property is  <code>true</code>, items without summarized values are still shown for the PivotField.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B5").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Fruit", 80},
     {"Vegetables", 95},
     {"Vegetables", 60}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setShowAllItems(true);
 boolean showAllItems = field.getShowAllItems();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if all items in the PivotTable report are displayed, even when they do not contain summary data; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setShowAllItems(boolean)">
<h3>setShowAllItems</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setShowAllItems</span><wbr><span class="parameters">(boolean&nbsp;value)</span></div>
<div class="block">Sets whether all items in the PivotTable report are displayed, even if they do not contain summary data. <p>The default value is  <code>false</code>. When this property is  <code>true</code>, items without summarized values are still shown for the PivotField.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B5").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Fruit", 120},
     {"Fruit", 80},
     {"Vegetables", 95},
     {"Vegetables", 60}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setShowAllItems(true);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - <code>true</code> if all items in the PivotTable report are displayed, even when they do not contain summary data; otherwise, <code>false</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSourceName()">
<h3>getSourceName</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a></span>&nbsp;<span class="element-name">getSourceName</span>()</div>
<div class="block">Gets the field name as it appears in the original source data. <p>This value identifies the underlying source field for the PivotTable report.  It can differ from the current display name returned by  <a href="#getName()"><code>getName()</code></a> if the field has been renamed by using  <a href="#setName(java.lang.String)"><code>setName(String)</code></a>.</p>
<pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Pear", 200}
 };
 worksheet.getRange("G1:H3").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("G1:H3"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("A1"), "PivotTable1");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setName("Item");
 String sourceName = field.getSourceName();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The original source field name.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getSubtotals()">
<h3>getSubtotals</h3>
<div class="member-signature"><span class="return-type"><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/EnumSet.html" title="class or interface in java.util">EnumSet</a>&lt;<a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel">SubtotalType</a>&gt;</span>&nbsp;<span class="element-name">getSubtotals</span>()</div>
<div class="block">Gets the combination of subtotal types currently shown for this PivotField. <p>This method is valid only for nondata fields. Use it to inspect which  <a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel"><code>SubtotalType</code></a> values are enabled for the field.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Beverages", 100},
     {"Beverages", 200},
     {"Snacks", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "pivotTable1");
 IPivotField categoryField = pivotTable.getPivotFields().get("Category");
 categoryField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 categoryField.setSubtotals(EnumSet.of(SubtotalType.Sum, SubtotalType.Count));
 EnumSet&lt;SubtotalType&gt; subtotals = categoryField.getSubtotals();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The combination of subtotal types currently shown for the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setSubtotals(java.util.EnumSet)">
<h3>setSubtotals</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setSubtotals</span><wbr><span class="parameters">(<a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/EnumSet.html" title="class or interface in java.util">EnumSet</a>&lt;<a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel">SubtotalType</a>&gt;&nbsp;value)</span></div>
<div class="block">Sets the combination of subtotal types currently shown for this PivotField. <p>This method is valid only for nondata fields. Use it to inspect which  <a href="SubtotalType.html" title="enum class in com.grapecity.documents.excel"><code>SubtotalType</code></a> values are enabled for the field.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Category", "Amount"},
     {"Beverages", 100},
     {"Beverages", 200},
     {"Snacks", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "pivotTable1");
 IPivotField categoryField = pivotTable.getPivotFields().get("Category");
 categoryField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 categoryField.setSubtotals(EnumSet.of(SubtotalType.Sum, SubtotalType.Count));
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The combination of subtotal types currently shown for the field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="autoSort(com.grapecity.documents.excel.SortOrder,java.lang.String)">
<h3>autoSort</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">autoSort</span><wbr><span class="parameters">(<a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a>&nbsp;Order,
 <a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang">String</a>&nbsp;Field)</span></div>
<div class="block">Establishes automatic field-sorting rules for a PivotTable report.
 <p>This method sorts the items in the current PivotField by using the specified
 sort order and the specified sort key field. The <code>Field</code> argument must
 be the unique source name of the sort key field, as returned by <a href="#getSourceName()"><code>getSourceName()</code></a>,
 rather than the displayed field name.</p>
<p><b>Example:</b></p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
 {"Product", "Region", "Amount"},
 {"Apple", "East", 120},
 {"Orange", "West", 80},
 {"Apple", "West", 150},
 {"Orange", "East", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField fieldRegion = pivotTable.getPivotFields().get("Region");
 fieldRegion.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.addDataField(pivotTable.getPivotFields().get("Amount"), "Sum of Amount", ConsolidationFunction.Sum);
 fieldRegion.autoSort(SortOrder.Descending, pivotTable.getPivotFields().get("Amount").getSourceName());
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>Order</code> - The sort order to apply.</dd>
<dd><code>Field</code> - The unique source name of the sort key field, as returned by <a href="#getSourceName()"><code>getSourceName()</code></a>; do not use the displayed field name.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="autoSort(com.grapecity.documents.excel.SortOrder)">
<h3>autoSort</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">autoSort</span><wbr><span class="parameters">(<a href="SortOrder.html" title="enum class in com.grapecity.documents.excel">SortOrder</a>&nbsp;Order)</span></div>
<div class="block">Establishes automatic field-sorting rules for a PivotTable field. <p>Use this method to apply automatic ascending or descending sorting to the current  field in a PivotTable report.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Product", "Region", "Amount"},
     {"Apple", "East", 120},
     {"Orange", "West", 80},
     {"Apple", "West", 150},
     {"Orange", "East", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField fieldRegion = pivotTable.getPivotFields().get("Region");
 fieldRegion.setOrientation(PivotFieldOrientation.RowField);
 fieldRegion.autoSort(SortOrder.Descending);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>Order</code> - The sort order to apply. Must not be <code>null</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearAllFilters()">
<h3>clearAllFilters</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">clearAllFilters</span>()</div>
<div class="block">Deletes all filters currently applied to this PivotField. <p>This method removes all filters from the  <a href="#getPivotFilters()"><code>getPivotFilters()</code></a> collection and also clears any manual filtering applied to the field. If the field is in the  report filter area, the selected item is reset to the default item.</p>
<pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Product", "Amount"},
     {"Example Speaker", 4270},
     {"Example TV", 2626},
     {"Example Mobile", 9062}
 };
 worksheet.getRange("G1:H4").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("G1:H4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("A1"), "pivottable1");
 IPivotField field = pivotTable.getPivotFields().get("Product");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.getPivotFilters().add(PivotFilterType.CaptionContains, "Example");
 field.clearAllFilters();
 </code></pre></div>
</section>
</li>
<li>
<section class="detail" id="group(com.grapecity.documents.excel.PivotFieldDateGroupOptions)">
<h3>group</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">group</span><wbr><span class="parameters">(<a href="PivotFieldDateGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldDateGroupOptions</a>&nbsp;options)</span></div>
<div class="block">Groups the PivotField by date or time units. <p>Use  <a href="PivotFieldDateGroupOptions.html" title="class in com.grapecity.documents.excel"><code>PivotFieldDateGroupOptions</code></a> to specify the grouped range and the date or time units used to create the grouped PivotField. The field  must be an uncalculated source field whose source items are date values.</p>
<pre><code data-language="Java">
 Workbook workbook = new Workbook();
 workbook.getOptions().getData().setAutomaticGroupDateTimeInPivotTable(false);
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Order Date", "Region", "Amount"},
     {java.time.LocalDateTime.of(2024, 1, 5, 0, 0), "East", 10},
     {java.time.LocalDateTime.of(2024, 1, 18, 0, 0), "West", 20},
     {java.time.LocalDateTime.of(2024, 2, 2, 0, 0), "East", 30},
     {java.time.LocalDateTime.of(2024, 2, 25, 0, 0), "West", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField orderDateField = pivotTable.getPivotFields().get("Order Date");
 orderDateField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
 options.setGroupBy(Collections.singletonList(PivotFieldDateGroupBy.Months));
 options.setAutoStart(true);
 options.setAutoEnd(true);
 orderDateField.group(options);
 String groupedFieldName = pivotTable.getRowFields().get(0).getName();
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>options</code> - The date grouping settings. Must not be <code>null</code>.</dd>
<dt>Throws:</dt>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>options</code> is <code>null</code>.</dd>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if this field cannot be grouped by date.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="group(com.grapecity.documents.excel.PivotFieldNumberGroupOptions)">
<h3>group</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">group</span><wbr><span class="parameters">(<a href="PivotFieldNumberGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldNumberGroupOptions</a>&nbsp;options)</span></div>
<div class="block">Groups the PivotField into numeric ranges. <p>Use  <a href="PivotFieldNumberGroupOptions.html" title="class in com.grapecity.documents.excel"><code>PivotFieldNumberGroupOptions</code></a> to specify the grouped range and numeric interval used to create each generated group. The field must be an  uncalculated source field whose source items are numeric values.</p>
<pre><code data-language="Java">
 Workbook workbook = new Workbook();
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Order ID", "Region", "Amount"},
     {10348, "East", 10},
     {10362, "East", 20},
     {10375, "West", 30},
     {10391, "West", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField orderIdField = pivotTable.getPivotFields().get("Order ID");
 orderIdField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
 options.setStart(10348d);
 options.setEnd(10407d);
 options.setAutoStart(false);
 options.setAutoEnd(false);
 options.setInterval(20);
 orderIdField.group(options);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>options</code> - The numeric grouping settings. Must not be <code>null</code>.</dd>
<dt>Throws:</dt>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>options</code> is <code>null</code>.</dd>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if this field cannot be grouped into numeric ranges.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="group(com.grapecity.documents.excel.PivotFieldCustomGroupOptions)">
<h3>group</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">group</span><wbr><span class="parameters">(<a href="PivotFieldCustomGroupOptions.html" title="class in com.grapecity.documents.excel">PivotFieldCustomGroupOptions</a>&nbsp;options)</span></div>
<div class="block">Creates a custom group from PivotItems in the PivotField. <p>Use  <a href="PivotFieldCustomGroupOptions.html" title="class in com.grapecity.documents.excel"><code>PivotFieldCustomGroupOptions</code></a> to specify the source PivotItem names, optional display name, and whether generated group fields are automatically added to  the PivotTable layout. Source names, item names, and captions are matched without case  sensitivity.</p>
<pre><code data-language="Java">
 Workbook workbook = new Workbook();
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Product", "Region", "Amount"},
     {"Apple", "East", 10},
     {"Banana", "West", 20},
     {"Carrot", "East", 30},
     {"Date", "West", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField productField = pivotTable.getPivotFields().get("Product");
 productField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 PivotFieldCustomGroupOptions options = new PivotFieldCustomGroupOptions();
 options.setName("Fruit Group");
 options.setItems(java.util.Arrays.asList("Apple", "Banana"));
 productField.group(options);
 </code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>options</code> - The custom grouping settings. Must not be <code>null</code>.</dd>
<dt>Throws:</dt>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>options</code> is <code>null</code>.</dd>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if this field cannot be grouped.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="ungroup()">
<h3>ungroup</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">ungroup</span>()</div>
<div class="block">Removes grouping from the pivot field. <p>After grouping is removed, the pivot field uses the original source  items from the PivotCache.</p>
<pre><code data-language="Java">
 Workbook workbook = new Workbook();
 workbook.getOptions().getData().setAutomaticGroupDateTimeInPivotTable(false);
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 worksheet.getRange("A1:C5").setValue(new Object[][] {
     {"Order Date", "Region", "Amount"},
     {java.time.LocalDateTime.of(2024, 1, 5, 0, 0), "East", 10},
     {java.time.LocalDateTime.of(2024, 1, 18, 0, 0), "West", 20},
     {java.time.LocalDateTime.of(2024, 2, 2, 0, 0), "East", 30},
     {java.time.LocalDateTime.of(2024, 2, 25, 0, 0), "West", 40}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField orderDateField = pivotTable.getPivotFields().get("Order Date");
 orderDateField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
 options.setGroupBy(Collections.singletonList(PivotFieldDateGroupBy.Months));
 orderDateField.group(options);
 orderDateField.ungroup();
 </code></pre></div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a class="external-link" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</a></code> - if this pivot field is not grouped.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearManualFilter()">
<h3>clearManualFilter</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">clearManualFilter</span>()</div>
<div class="block">Clears manual filtering from the PivotField. <p>This method sets the visible state of all items in the field to visible in  PivotTables. For OLAP PivotTables, it also clears the hidden and visible item  lists used by manual filtering.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B5").setValue(new Object[][] {
     {"Region", "Amount"},
     {"East", 120},
     {"West", 80},
     {"East", 150},
     {"South", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B5"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "PivotTable1");
 IPivotField fieldRegion = pivotTable.getPivotFields().get("Region");
 fieldRegion.setOrientation(PivotFieldOrientation.RowField);
 fieldRegion.getPivotItems().get("West").setVisible(false);
 fieldRegion.clearManualFilter();
 </code></pre></div>
</section>
</li>
<li>
<section class="detail" id="getPivotItems()">
<h3>getPivotItems</h3>
<div class="member-signature"><span class="return-type"><a href="IPivotItems.html" title="interface in com.grapecity.documents.excel">IPivotItems</a></span>&nbsp;<span class="element-name">getPivotItems</span>()</div>
<div class="block">Gets the collection of all visible and hidden items in this PivotTable field. <p>Use this collection to access individual field items, including items that are currently hidden by manual filtering.</p>
<pre><code data-language="Java">
 Object[][] sourceData = {
     {"Region", "Amount"},
     {"North", 100},
     {"South", 200},
     {"East", 150}
 };
 worksheet.getRange("A1:B4").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "salesPivot");
 IPivotField field = pivotTable.getPivotFields().get("Region");
 field.setOrientation(PivotFieldOrientation.RowField);
 IPivotItems items = field.getPivotItems();
 items.get("North").setVisible(false);
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The collection of all visible and hidden items in this field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCalculatedItems()">
<h3>getCalculatedItems</h3>
<div class="member-signature"><span class="return-type"><a href="ICalculatedItems.html" title="interface in com.grapecity.documents.excel">ICalculatedItems</a></span>&nbsp;<span class="element-name">getCalculatedItems</span>()</div>
<div class="block">Gets the collection of calculated items for this  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>. <p>The returned  <a href="ICalculatedItems.html" title="interface in com.grapecity.documents.excel"><code>ICalculatedItems</code></a> collection represents all calculated items defined for the current PivotTable field and can be used to access or add calculated items.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Region", "Product", "Amount"},
     {"East", "Apple", 120},
     {"East", "Banana", 80},
     {"West", "Apple", 90}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
 pivotTable.getPivotFields().get("Region").setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Product").setOrientation(PivotFieldOrientation.ColumnField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 ICalculatedItems calculatedItems = pivotTable.getPivotFields().get("Product").getCalculatedItems();
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The <a href="ICalculatedItems.html" title="interface in com.grapecity.documents.excel"><code>ICalculatedItems</code></a> collection for the current PivotTable field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPivotFilters()">
<h3>getPivotFilters</h3>
<div class="member-signature"><span class="return-type"><a href="IPivotFilters.html" title="interface in com.grapecity.documents.excel">IPivotFilters</a></span>&nbsp;<span class="element-name">getPivotFilters</span>()</div>
<div class="block">Gets the pivot filter collection for this  <a href="IPivotField.html" title="interface in com.grapecity.documents.excel"><code>IPivotField</code></a>. <p>The returned  <a href="IPivotFilters.html" title="interface in com.grapecity.documents.excel"><code>IPivotFilters</code></a> collection contains the label, date, and value filters defined for the current pivot field and can be used to add or access filters.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Mi Phone", 100},
     {"Camera", 200},
     {"Mi Band", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField productField = pivotTable.getPivotFields().get("Product");
 productField.setOrientation(PivotFieldOrientation.RowField);
 IPivotFilters filters = productField.getPivotFilters();
 filters.add(PivotFilterType.CaptionContains, "Mi");
 </code></pre></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The <a href="IPivotFilters.html" title="interface in com.grapecity.documents.excel"><code>IPivotFilters</code></a> collection for the current pivot field.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearLabelFilter()">
<h3>clearLabelFilter</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">clearLabelFilter</span>()</div>
<div class="block">Clears all label filters or date filters from this pivot field. <p>This method removes the label-based filter criteria stored in the  pivot field's  <a href="#getPivotFilters()"><code>getPivotFilters()</code></a> collection. Use this method when you want to keep other filter types, such as value filters, unchanged.</p>
<pre><code data-language="Java">
 Object[][] sourceData = new Object[][] {
     {"Product", "Amount"},
     {"Mi Phone", 100},
     {"Camera", 200},
     {"Mi Band", 150}
 };
 worksheet.getRange("A1:B4").setValue(sourceData);
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField productField = pivotTable.getPivotFields().get("Product");
 productField.setOrientation(PivotFieldOrientation.RowField);
 productField.getPivotFilters().add(PivotFilterType.CaptionContains, "Mi");
 productField.clearLabelFilter();
 </code></pre></div>
</section>
</li>
<li>
<section class="detail" id="clearValueFilter()">
<h3>clearValueFilter</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">clearValueFilter</span>()</div>
<div class="block">Clears all value filters from this pivot field. <p>This method removes value-based filter criteria from the pivot field's  <a href="#getPivotFilters()"><code>getPivotFilters()</code></a> collection. Use this method when you want to clear value filters without removing label filters or manual filtering.</p>
<pre><code data-language="Java">
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {"Product", "Amount"},
     {"Apple", 100},
     {"Banana", 200},
     {"Apple", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:B4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("D1"), "SalesPivot");
 IPivotField productField = pivotTable.getPivotFields().get("Product");
 productField.setOrientation(PivotFieldOrientation.RowField);
 pivotTable.getPivotFields().get("Amount").setOrientation(PivotFieldOrientation.DataField);
 PivotFilterOptions options = new PivotFilterOptions();
 options.setAppliedDataField(0);
 productField.getPivotFilters().add(PivotFilterType.ValueGreaterThan, 120, null, options);
 productField.clearValueFilter();
 </code></pre></div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
<script>var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";

function show(tableId, selected, columns) {
    if (tableId !== selected) {
        document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
            .forEach(function (elem) {
                elem.style.display = 'none';
            });
    }
    document.querySelectorAll('div.' + selected)
        .forEach(function (elem, index) {
            elem.style.display = '';
            var isEvenRow = index % (columns * 2) < columns;
            elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
            elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
        });
    updateTabs(tableId, selected);
}

function updateTabs(tableId, selected) {
    document.querySelector('div#' + tableId + ' .summary-table')
        .setAttribute('aria-labelledby', selected);
    document.querySelectorAll('button[id^="' + tableId + '"]')
        .forEach(function (tab, index) {
            if (selected === tab.id || (tableId === selected && index === 0)) {
                tab.className = activeTableTab;
                tab.setAttribute('aria-selected', true);
                tab.setAttribute('tabindex', 0);
            } else {
                tab.className = tableTab;
                tab.setAttribute('aria-selected', false);
                tab.setAttribute('tabindex', -1);
            }
        });
}

function switchTab(e) {
    var selected = document.querySelector('[aria-selected=true]');
    if (selected) {
        if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
            // left or up arrow key pressed: move focus to previous tab
            selected.previousSibling.click();
            selected.previousSibling.focus();
            e.preventDefault();
        } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
            // right or down arrow key pressed: move focus to next tab
            selected.nextSibling.click();
            selected.nextSibling.focus();
            e.preventDefault();
        }
    }
}
</script></div>