Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

ExcelPivotFieldOptions

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Modifiers sealed

Describes formatting and display options for a pivot source field.

Inheritance

  • Object
  • ExcelPivotFieldOptions

Usage

Explore 5 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.

Accepted by parameters 2

Constructors

public ExcelPivotFieldOptions(String fieldName, ExcelPivotFieldSort? sortType = null, UInt32? numberFormatId = null, String? numberFormat = null, Boolean? showAll = null, Boolean? defaultSubtotal = null, Boolean? subtotalTop = null, Boolean? insertBlankRow = null, Boolean? insertPageBreak = null, Boolean? compact = null, Boolean? outline = null, Boolean? showDropDowns = null, Boolean? multipleItemSelectionAllowed = null, Boolean? 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 System.String requiredposition: 0
Header name from the source range.
sortType OfficeIMO.Excel.ExcelPivotFieldSort? = null optionalposition: 1
Optional pivot field sort mode.
numberFormatId System.UInt32? = null optionalposition: 2
Optional number format id to apply to the pivot field.
numberFormat System.String? = null optionalposition: 3
Optional number format code to apply to the pivot field.
showAll System.Boolean? = null optionalposition: 4
Whether to show all items for the pivot field.
defaultSubtotal System.Boolean? = null optionalposition: 5
Whether to use the default subtotal for the pivot field.
subtotalTop System.Boolean? = null optionalposition: 6
Whether subtotals should be shown at the top.
insertBlankRow System.Boolean? = null optionalposition: 7
Whether to insert a blank row after each item.
insertPageBreak System.Boolean? = null optionalposition: 8
Whether to insert a page break after each item.
compact System.Boolean? = null optionalposition: 9
Whether compact layout is enabled for this field.
outline System.Boolean? = null optionalposition: 10
Whether outline layout is enabled for this field.
showDropDowns System.Boolean? = null optionalposition: 11
Whether field drop-downs are shown.
multipleItemSelectionAllowed System.Boolean? = null optionalposition: 12
Whether multiple filter item selection is allowed.
includeNewItemsInFilter System.Boolean? = null optionalposition: 13
Whether new source items are included in the filter by default.
subtotalCaption System.String? = null optionalposition: 14
Optional custom subtotal caption.
hiddenItems System.Collections.Generic.IEnumerable<System.String>? = null optionalposition: 15
Optional source item captions to hide.
visibleItems System.Collections.Generic.IEnumerable<System.String>? = null optionalposition: 16
Optional source item captions to show; other known items are hidden.
selectedItem System.String? = null optionalposition: 17
Optional page-field item caption to select.

Methods

public static ExcelPivotFieldOptions HideItems(String fieldName, params String[] items) #
Returns: ExcelPivotFieldOptions

Creates field options that hide the specified source item captions.

Parameters

fieldName System.String requiredposition: 0
items System.String[] requiredposition: 1
public static ExcelPivotFieldOptions SelectPageItem(String fieldName, String item) #
Returns: ExcelPivotFieldOptions

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

Parameters

fieldName System.String requiredposition: 0
item System.String requiredposition: 1
public static ExcelPivotFieldOptions ShowOnlyItems(String fieldName, params String[] items) #
Returns: ExcelPivotFieldOptions

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

Parameters

fieldName System.String requiredposition: 0
items System.String[] requiredposition: 1

Properties

public String FieldName { get; } #

Gets the source field name.

public ExcelPivotFieldSort? SortType { get; } #

Gets the optional pivot field sort mode.

public UInt32? NumberFormatId { get; } #

Gets the optional number format id.

public String? NumberFormat { get; } #

Gets the optional number format code.

public Boolean? ShowAll { get; } #

Gets whether all items should be shown for the field.

public Boolean? DefaultSubtotal { get; } #

Gets whether the default subtotal should be used.

public Boolean? SubtotalTop { get; } #

Gets whether subtotals should be shown at the top.

public Boolean? InsertBlankRow { get; } #

Gets whether to insert a blank row after each item.

public Boolean? InsertPageBreak { get; } #

Gets whether to insert a page break after each item.

public Boolean? Compact { get; } #

Gets whether compact layout is enabled for this field.

public Boolean? Outline { get; } #

Gets whether outline layout is enabled for this field.

public Boolean? ShowDropDowns { get; } #

Gets whether field drop-downs are shown.

public Boolean? MultipleItemSelectionAllowed { get; } #

Gets whether multiple item selection is allowed.

public Boolean? 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.

public IReadOnlyList<String> VisibleItems { get; } #

Gets source item captions to show; other known items are hidden.

public String? SelectedItem { get; } #

Gets the selected page-field item caption.