Table of Contents

Class XlsPivotField

Namespace
Spire.Xls.Core.Spreadsheet.PivotTables
Assembly
Spire.XLS.dll
public class XlsPivotField : IPivotField, ICloneParent
Inheritance
XlsPivotField
Implements
Derived
Inherited Members

Constructors

XlsPivotField(object)

public XlsPivotField(object parent)

Parameters

parent object

Properties

AutoSort

Preserves the sorting elements of the field

public AutoSortScope AutoSort { get; set; }

Property Value

AutoSortScope

Axis

public AxisTypes Axis { get; set; }

Property Value

AxisTypes

CanDragOff

public bool CanDragOff { get; set; }

Property Value

bool

CanDragToColumn

public bool CanDragToColumn { get; set; }

Property Value

bool

CanDragToData

public bool CanDragToData { get; set; }

Property Value

bool

CanDragToPage

public bool CanDragToPage { get; set; }

Property Value

bool

CanDragToRow

public bool CanDragToRow { get; set; }

Property Value

bool

Caption

Specifies the unique name of the member property to be used as a caption for the field and field items.

public string Caption { get; set; }

Property Value

string

Compact

Specifies a boolean value that indicates whether the application will display fields compactly in the sheet on which this PivotTable resides

public bool Compact { get; set; }

Property Value

bool

CustomName

Gets/sets pivot field custom name.

public string CustomName { get; set; }

Property Value

string

DataField

public bool DataField { get; set; }

Property Value

bool

Formula

Specifies the formula for the calculated field

public string Formula { get; set; }

Property Value

string

IsAutoShow

Autoshow is enabled.

public bool IsAutoShow { get; set; }

Property Value

bool

IsDataField

public bool IsDataField { get; }

Property Value

bool

IsDragToHide

User can remove field from fiew.

public bool IsDragToHide { get; set; }

Property Value

bool

IsFormulaField

Indicates whether this field is formula field

public bool IsFormulaField { get; }

Property Value

bool

IsMultiSelected

Specifies a boolean value that indicates whether the field can have multiple items selected in the page field.

public bool IsMultiSelected { get; set; }

Property Value

bool

IsShowAllItems

Show all items for this field.

public bool IsShowAllItems { get; set; }

Property Value

bool

ItemsPerPage

Specifies the number of items showed per page in the PivotTable.

public int ItemsPerPage { get; set; }

Property Value

int

Name

public string Name { get; }

Property Value

string

NumberFormat

public string NumberFormat { get; set; }

Property Value

string

NumberFormatIndex

public int NumberFormatIndex { get; set; }

Property Value

int

Parent

public PivotTableFields Parent { get; }

Property Value

PivotTableFields

RepeatItemLabels

True if the field repeat item labels.

public bool RepeatItemLabels { get; set; }

Property Value

bool

ShowBlankRow

True if a blank row is inserted after the specified row field in a PivotTable report.

public bool ShowBlankRow { get; set; }

Property Value

bool

ShowDataAs

public PivotFieldFormatType ShowDataAs { get; set; }

Property Value

PivotFieldFormatType

ShowDropDown

True if the flag for the specified PivotTable field or PivotTable item is set to "drilled" (expanded, or visible).

public bool ShowDropDown { get; set; }

Property Value

bool

ShowNewItemsInFilter

Specifies a boolean value that indicates whether manual filter is in inclusive mode.

public bool ShowNewItemsInFilter { get; set; }

Property Value

bool

ShowNewItemsOnRefresh

Specifies a boolean value that indicates whether new items that appear after a refresh should be hidden by default.

public bool ShowNewItemsOnRefresh { get; set; }

Property Value

bool

ShowOutline

Specifies a boolean value that indicates whether the items in this field should be shown in Outline form. If the parameter is true, the field layout is "Show item labels in outline form". If the parameter is false, the field layout is "Show item labels in tabular form".

public bool ShowOutline { get; set; }

Property Value

bool

ShowPageBreak

True if a page break is inserted after each field.

public bool ShowPageBreak { get; set; }

Property Value

bool

ShowPropAsCaption

Specifies a boolean value that indicates whether to show the property as a member caption.

public bool ShowPropAsCaption { get; set; }

Property Value

bool

ShowToolTip

Specifies a boolean value that indicates whether to show the member property value in a tooltip on the appropriate PivotTable cells.

public bool ShowToolTip { get; set; }

Property Value

bool

SortType

Specifies the type of sort that is applied to this field.

public PivotFieldSortType? SortType { get; set; }

Property Value

PivotFieldSortType?

SubtotalCaption

Specifies the custom text that is displayed for the subtotals caption.

public string SubtotalCaption { get; set; }

Property Value

string

SubtotalTop

Get or set whether show

public bool SubtotalTop { get; set; }

Property Value

bool

Subtotals

public SubtotalTypes Subtotals { get; set; }

Property Value

SubtotalTypes

Methods

AddItemOption(int)

Represents the index of item and itemoptions key pairs

public void AddItemOption(int index)

Parameters

index int

Clone(object)

public object Clone(object parent)

Parameters

parent object

Returns

object

HideAllItem(bool)

Sets whether the all PivotItem in a data field is hidden. Must call after pivottable CalculateData function.

public void HideAllItem(bool isHidden)

Parameters

isHidden bool

whether the specific PivotItem is hidden

HideDetail(bool)

Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field. Must call after pivottable CalculateData function.

public void HideDetail(bool isHiddenDetail)

Parameters

isHiddenDetail bool

whether DetailItems is hidden

HideItem(int, bool)

Sets whether the specific PivotItem in a data field is hidden. Must call after pivottable CalculateData function.

public void HideItem(int index, bool isHidden)

Parameters

index int

the index of the pivotItem in the pivotField.

isHidden bool

whether the specific PivotItem is hidden

HideItem(string, bool)

Sets whether the specific PivotItem in a data field is hidden. Must call after pivottable CalculateData function.

public void HideItem(string itemValue, bool isHidden)

Parameters

itemValue string

the value of the pivotItem in the pivotField.

isHidden bool

whether the specific PivotItem is hidden

HideItemDetail(int, bool)

Sets whether the specific PivotItem in a pivot field is hidden detail. Must call after pivottable CalculateData function.

public void HideItemDetail(int index, bool isHiddenDetail)

Parameters

index int

the index of the pivotItem in the pivotField.

isHiddenDetail bool

whether the specific PivotItem is hidden

HideItemDetail(string, bool)

Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field. Must call after pivottable CalculateData function.

public void HideItemDetail(string itemValue, bool isHiddenDetail)

Parameters

itemValue string

the value of the pivotItem in the pivotField.

isHiddenDetail bool

whether the specific PivotItem is hidden

IsHiddenItem(int)

Indicates whether the specific PivotItem is hidden. Must call after pivottable CalculateData function.

public bool IsHiddenItem(int index)

Parameters

index int

the index of the pivotItem in the pivotField.

Returns

bool

whether the specific PivotItem is hidden

IsHiddenItemDetail(int)

Indicates whether the specific PivotItem is hidden detail. Must call after pivottable CalculateData function.

public bool IsHiddenItemDetail(int index)

Parameters

index int

the index of the pivotItem in the pivotField.

Returns

bool

whether the specific PivotItem is hidden detail

Sort(bool, PivotDataField)

Sort row fildes or col fields by data field.

public void Sort(bool isAscendSort, PivotDataField sortByField)

Parameters

isAscendSort bool
sortByField PivotDataField