ExcelPivotFieldOptions
OfficeIMO.Excel
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.
Returned or exposed by 4
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
- Header name from the source range.
- sortType OfficeIMO.Excel.ExcelPivotFieldSort? = null
- Optional pivot field sort mode.
- numberFormatId uint? = null
- Optional number format id to apply to the pivot field.
- numberFormat string? = null
- Optional number format code to apply to the pivot field.
- showAll bool? = null
- Whether to show all items for the pivot field.
- defaultSubtotal bool? = null
- Whether to use the default subtotal for the pivot field.
- subtotalTop bool? = null
- Whether subtotals should be shown at the top.
- insertBlankRow bool? = null
- Whether to insert a blank row after each item.
- insertPageBreak bool? = null
- Whether to insert a page break after each item.
- compact bool? = null
- Whether compact layout is enabled for this field.
- outline bool? = null
- Whether outline layout is enabled for this field.
- showDropDowns bool? = null
- Whether field drop-downs are shown.
- multipleItemSelectionAllowed bool? = null
- Whether multiple filter item selection is allowed.
- includeNewItemsInFilter bool? = null
- Whether new source items are included in the filter by default.
- subtotalCaption string? = null
- Optional custom subtotal caption.
- hiddenItems System.Collections.Generic.IEnumerable<string>? = null
- Optional source item captions to hide.
- visibleItems System.Collections.Generic.IEnumerable<string>? = null
- Optional source item captions to show; other known items are hidden.
- selectedItem string? = null
- 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
- items string[]
Returns
ExcelPivotFieldOptionspublic static ExcelPivotFieldOptions SelectPageItem(string fieldName, string item) #Creates field options that select an item for a page/filter field.
Parameters
- fieldName string
- item string
Returns
ExcelPivotFieldOptionspublic static ExcelPivotFieldOptions ShowOnlyItems(string fieldName, params string[] items) #Creates field options that show only the specified source item captions.
Parameters
- fieldName string
- items string[]
Returns
ExcelPivotFieldOptionsInherited Methods
Properties
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> 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.