API Reference
ExcelPivotFieldOptions
Describes formatting and display options for a pivot source field.
Inheritance
- Object
- ExcelPivotFieldOptions
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Accepted by parameters
- Method ExcelSheet.AddPivotTable
- Method PivotTableBuilder.FieldOptions
Constructors
public ExcelPivotFieldOptions(String fieldName, Nullable<FieldSortValues> sortType = null, Nullable<UInt32> numberFormatId = null, String numberFormat = null, Nullable<Boolean> showAll = null, Nullable<Boolean> defaultSubtotal = null, Nullable<Boolean> subtotalTop = null, Nullable<Boolean> insertBlankRow = null, Nullable<Boolean> insertPageBreak = null, Nullable<Boolean> compact = null, Nullable<Boolean> outline = null, Nullable<Boolean> showDropDowns = null, Nullable<Boolean> multipleItemSelectionAllowed = null, Nullable<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
- Header name from the source range.
- sortType System.Nullable{DocumentFormat.OpenXml.Spreadsheet.FieldSortValues} = null
- Optional pivot field sort mode.
- numberFormatId System.Nullable{System.UInt32} = null
- Optional number format id to apply to the pivot field.
- numberFormat System.String = null
- Optional number format code to apply to the pivot field.
- showAll System.Nullable{System.Boolean} = null
- Whether to show all items for the pivot field.
- defaultSubtotal System.Nullable{System.Boolean} = null
- Whether to use the default subtotal for the pivot field.
- subtotalTop System.Nullable{System.Boolean} = null
- Whether subtotals should be shown at the top.
- insertBlankRow System.Nullable{System.Boolean} = null
- Whether to insert a blank row after each item.
- insertPageBreak System.Nullable{System.Boolean} = null
- Whether to insert a page break after each item.
- compact System.Nullable{System.Boolean} = null
- Whether compact layout is enabled for this field.
- outline System.Nullable{System.Boolean} = null
- Whether outline layout is enabled for this field.
- showDropDowns System.Nullable{System.Boolean} = null
- Whether field drop-downs are shown.
- multipleItemSelectionAllowed System.Nullable{System.Boolean} = null
- Whether multiple filter item selection is allowed.
- includeNewItemsInFilter System.Nullable{System.Boolean} = null
- Whether new source items are included in the filter by default.
- subtotalCaption System.String = null
- Optional custom subtotal caption.
- hiddenItems System.Collections.Generic.IEnumerable{System.String} = null
- Optional source item captions to hide.
- visibleItems System.Collections.Generic.IEnumerable{System.String} = null
- Optional source item captions to show; other known items are hidden.
- selectedItem System.String = null
- Optional page-field item caption to select.
Methods
public static ExcelPivotFieldOptions HideItems(String fieldName, params String[] items) #ExcelPivotFieldOptionsCreates field options that hide the specified source item captions.
Parameters
- fieldName System.String
- items System.String[]
public static ExcelPivotFieldOptions SelectPageItem(String fieldName, String item) #ExcelPivotFieldOptionsCreates field options that select an item for a page/filter field.
Parameters
- fieldName System.String
- item System.String
public static ExcelPivotFieldOptions ShowOnlyItems(String fieldName, params String[] items) #ExcelPivotFieldOptionsCreates field options that show only the specified source item captions.
Parameters
- fieldName System.String
- items System.String[]
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String FieldName { get; } #Gets the source field name.
public Nullable<FieldSortValues> SortType { get; } #Gets the optional pivot field sort mode.
public Nullable<UInt32> NumberFormatId { get; } #Gets the optional number format id.
public String NumberFormat { get; } #Gets the optional number format code.
public Nullable<Boolean> ShowAll { get; } #Gets whether all items should be shown for the field.
public Nullable<Boolean> DefaultSubtotal { get; } #Gets whether the default subtotal should be used.
public Nullable<Boolean> SubtotalTop { get; } #Gets whether subtotals should be shown at the top.
public Nullable<Boolean> InsertBlankRow { get; } #Gets whether to insert a blank row after each item.
public Nullable<Boolean> InsertPageBreak { get; } #Gets whether to insert a page break after each item.
public Nullable<Boolean> Compact { get; } #Gets whether compact layout is enabled for this field.
public Nullable<Boolean> Outline { get; } #Gets whether outline layout is enabled for this field.
public Nullable<Boolean> ShowDropDowns { get; } #Gets whether field drop-downs are shown.
public Nullable<Boolean> MultipleItemSelectionAllowed { get; } #Gets whether multiple item selection is allowed.
public Nullable<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> VisibleItems { get; } #Gets source item captions to show; other known items are hidden.
public String SelectedItem { get; } #Gets the selected page-field item caption.