Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelPivotFieldOptions

OfficeIMO.Excel

Namespace
OfficeIMO.Excel
Assembly
OfficeIMO.Excel
Source revision
551365f138da with working tree changes
Modifiers
sealed

Describes formatting and display options for a pivot source field.

Inheritance

  • object
  • ExcelPivotFieldOptions

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public ExcelPivotFieldOptions(string fieldName, ExcelPivotFieldSort? sortType = null, uint? numberFormatId = null, string? numberFormat = null, bool? showAll = null, bool? defaultSubtotal = null, bool? subtotalTop = null, bool? insertBlankRow = null, bool? insertPageBreak = null, bool? compact = null, bool? outline = null, bool? showDropDowns = null, bool? multipleItemSelectionAllowed = null, bool? includeNewItemsInFilter = null, string? subtotalCaption = null, IEnumerable<string>? hiddenItems = null, IEnumerable<string>? visibleItems = null, string? selectedItem = null) #

Creates pivot field options for a source field.

Parameters

fieldName string required
Header name from the source range.
sortType OfficeIMO.Excel.ExcelPivotFieldSort? = null optional
Optional pivot field sort mode.
numberFormatId uint? = null optional
Optional number format id to apply to the pivot field.
numberFormat string? = null optional
Optional number format code to apply to the pivot field.
showAll bool? = null optional
Whether to show all items for the pivot field.
defaultSubtotal bool? = null optional
Whether to use the default subtotal for the pivot field.
subtotalTop bool? = null optional
Whether subtotals should be shown at the top.
insertBlankRow bool? = null optional
Whether to insert a blank row after each item.
insertPageBreak bool? = null optional
Whether to insert a page break after each item.
compact bool? = null optional
Whether compact layout is enabled for this field.
outline bool? = null optional
Whether outline layout is enabled for this field.
showDropDowns bool? = null optional
Whether field drop-downs are shown.
multipleItemSelectionAllowed bool? = null optional
Whether multiple filter item selection is allowed.
includeNewItemsInFilter bool? = null optional
Whether new source items are included in the filter by default.
subtotalCaption string? = null optional
Optional custom subtotal caption.
hiddenItems System.Collections.Generic.IEnumerable<string>? = null optional
Optional source item captions to hide.
visibleItems System.Collections.Generic.IEnumerable<string>? = null optional
Optional source item captions to show; other known items are hidden.
selectedItem string? = null optional
Optional page-field item caption to select.

Methods

public static ExcelPivotFieldOptions HideItems(string fieldName, params string[] items) #

Creates field options that hide the specified source item captions.

Parameters

fieldName string required
items string[] required
public static ExcelPivotFieldOptions SelectPageItem(string fieldName, string item) #

Creates field options that select an item for a page/filter field.

Parameters

fieldName string required
item string required
public static ExcelPivotFieldOptions ShowOnlyItems(string fieldName, params string[] items) #

Creates field options that show only the specified source item captions.

Parameters

fieldName string required
items string[] required

Properties

public string FieldName { get; } #

Gets the source field name.

public ExcelPivotFieldSort? SortType { get; } #

Gets the optional pivot field sort mode.

public uint? NumberFormatId { get; } #

Gets the optional number format id.

public string? NumberFormat { get; } #

Gets the optional number format code.

public bool? ShowAll { get; } #

Gets whether all items should be shown for the field.

public bool? DefaultSubtotal { get; } #

Gets whether the default subtotal should be used.

public bool? SubtotalTop { get; } #

Gets whether subtotals should be shown at the top.

public bool? InsertBlankRow { get; } #

Gets whether to insert a blank row after each item.

public bool? InsertPageBreak { get; } #

Gets whether to insert a page break after each item.

public bool? Compact { get; } #

Gets whether compact layout is enabled for this field.

public bool? Outline { get; } #

Gets whether outline layout is enabled for this field.

public bool? ShowDropDowns { get; } #

Gets whether field drop-downs are shown.

public bool? MultipleItemSelectionAllowed { get; } #

Gets whether multiple item selection is allowed.

public bool? IncludeNewItemsInFilter { get; } #

Gets whether new source items are included in the filter by default.

public string? SubtotalCaption { get; } #

Gets the optional custom subtotal caption.

public IReadOnlyList<string> HiddenItems { get; } #

Gets source item captions to hide. An empty caption selects a blank; whitespace is literal.

public IReadOnlyList<string> VisibleItems { get; } #

Gets source item captions to show; other known items are hidden. An empty caption selects a blank; whitespace is literal.

public string? SelectedItem { get; } #

Gets the selected page-field item caption. Null leaves it unselected; an empty caption selects a blank.