[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotField

Interface IPivotField

Namespace
GrapeCity.Documents.Excel
Assembly
GcDocs.Excel.dll

Represents a field in a PivotTable report. The PivotField object is a member of the PivotFields collection. The PivotFields collection contains all the fields in a PivotTable report, including hidden fields.

public interface IPivotField

Properties

AllItemsVisible

Retrieves a value that indicates whether any manual filtering is applied to Pivotfield.

bool AllItemsVisible { get; }

Property Value

bool

AutoSortField

Returns the name of the data field used to sort the specified PivotTable field automatically.

string AutoSortField { get; }

Property Value

string

AutoSortOrder

Returns the order used to sort the specified PivotTable field automatically.

SortOrder? AutoSortOrder { get; }

Property Value

SortOrder?

BaseField

Gets or sets the base field for a custom calculation. This property is valid only for data fields.

string BaseField { get; set; }

Property Value

string

BaseItem

Gets or sets the item in the base field for a custom calculation. Valid only for data fields.

string BaseItem { get; set; }

Property Value

string

Calculation

Gets or sets a PivotFieldCalculation value that represents the type of calculation performed by the specified field. This property is valid only for data fields.

PivotFieldCalculation Calculation { get; set; }

Property Value

PivotFieldCalculation

CurrentPage

Gets or sets the current page's index showing for the page field (valid only for page fields). The valid value is based on zero. "-1" indicates "All" or "Multiple Items".

int CurrentPage { get; set; }

Property Value

int

DragToColumn

Gets or sets whether the specified field can be dragged to the column position. The default value is True.

bool DragToColumn { get; set; }

Property Value

bool

DragToData

Gets or sets whether the specified field can be dragged to the data position. The default value is True.

bool DragToData { get; set; }

Property Value

bool

DragToHide

Gets or sets whether the field can be hidden by being dragged off the PivotTable report. The default value is True.

bool DragToHide { get; set; }

Property Value

bool

DragToPage

Gets or sets whether the field can be dragged to the page position. The default value is True.

bool DragToPage { get; set; }

Property Value

bool

DragToRow

Gets or sets whether the field can be dragged to the row position. The default value is True.

bool DragToRow { get; set; }

Property Value

bool

EnableMultiplePageItems

Gets or sets whether the field can have multiple items selected in the page field. The default value is false.

bool EnableMultiplePageItems { get; set; }

Property Value

bool

Formula

Returns or sets a String value that represents the object's formula in A1-style notation and in the language of the macro.

string Formula { get; set; }

Property Value

string

Function

Gets or sets the function used to summarize the PivotTable field (data fields only). This object is read or write.

ConsolidationFunction Function { get; set; }

Property Value

ConsolidationFunction

LayoutBlankLine

True if a blank row is inserted after the specified row field in a PivotTable report. The default value is False.

bool LayoutBlankLine { get; set; }

Property Value

bool

LayoutCompactRow

Specifies whether or not a PivotField is compacted(items of multiple PivotFields are displayed in a single column) when rows are selected.

bool LayoutCompactRow { get; set; }

Property Value

bool

LayoutForm

Returns or sets the way the specified PivotTable items appear — in table format or in outline format.

LayoutFormType LayoutForm { get; set; }

Property Value

LayoutFormType

LayoutSubtotalLocation

Gets or sets the position of the PivotTable field subtotals in relation to (either above or below) the specified field.

SubtotalLocationType LayoutSubtotalLocation { get; set; }

Property Value

SubtotalLocationType

Name

Gets or sets the name of the object (read or write).

string Name { get; set; }

Property Value

string

NumberFormat

Gets or sets the format code for the object.

string NumberFormat { get; set; }

Property Value

string

Orientation

Gets or sets the location of the field in the specified PivotTable report.

PivotFieldOrientation Orientation { get; set; }

Property Value

PivotFieldOrientation

PivotFilters

Get the filter set of the current IPivotField.

IPivotFilters PivotFilters { get; }

Property Value

IPivotFilters

PivotItems

Returns a collection of all the visible and hidden items in the specified field.

IPivotItems PivotItems { get; }

Property Value

IPivotItems

Position

Gets or sets the position of the field (first, second, third, and so on) among all the fields in its orientation (Rows, Columns, Pages, Data).

int Position { get; set; }

Property Value

int

RepeatLabels

Gets or sets whether item labels are repeated in the PivotTable for the specified PivotField.

bool RepeatLabels { get; set; }

Property Value

bool

ShowAllItems

True if all items in the PivotTable report are displayed, even if they don’t contain summary data. The default value is False.

bool ShowAllItems { get; set; }

Property Value

bool

SourceName

Returns the specified object’s name as it appears in the original source data for the specified PivotTable report. This might be different from the current item name if the user renamed the item after creating the PivotTable report.

string SourceName { get; }

Property Value

string

Subtotals

Gets or sets a combination of all the showing subtotal types in the specified PivotField. Valid only for nondata fields.

SubtotalType Subtotals { get; set; }

Property Value

SubtotalType

Methods

AutoSort(SortOrder?, string)

Establishes automatic field-sorting rules for PivotTable reports.

void AutoSort(SortOrder? order, string field = null)

Parameters

order SortOrder?

Required SortOrder. The sort order.

field string

The name of the sort key field. You must specify the unique name (as returned from the PivotField.SourceName property) and not the displayed name.

CalculatedItems()

Returns a ICalculatedItems collection that represents all the calculated items in the specified PivotTable report.

ICalculatedItems CalculatedItems()

Returns

ICalculatedItems

CalculatedItems collection.

ClearAllFilters()

Deletes all filters currently applied to the PivotField. This includes deleting all filters from the PivotFilters collection of the PivotField and removing any manual filtering applied to the PivotField as well. If the PivotField is in the Report Filter area, the item selected will be set to the default item.

void ClearAllFilters()

ClearLabelFilter()

This method deletes all label filters or all date filters in the PivotFilters collection of the PivotField.

void ClearLabelFilter()

ClearManualFilter()

Provides an easy way to set the Visible property to True for all items of a PivotField in PivotTables, and to empty the HiddenItemsList and VisibleItemsList collections in OLAP PivotTables.

void ClearManualFilter()

ClearValueFilter()

This method deletes all value filters in the PivotFilters collection of the PivotField.

void ClearValueFilter()