API Reference
ExcelPivotGrouping
Describes date or numeric grouping metadata for a pivot source field.
Inheritance
- Object
- ExcelPivotGrouping
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
- Method ExcelPivotGrouping.Date
- Method ExcelPivotGrouping.DateHierarchy
- Method ExcelPivotGrouping.DateHierarchy
- Method ExcelPivotGrouping.Number
Accepted by parameters
- Method ExcelSheet.AddPivotTable
- Method PivotTableBuilder.Group
Methods
public static ExcelPivotGrouping Date(String fieldName, GroupByValues groupBy, Nullable<DateTime> startDate = null, Nullable<DateTime> endDate = null, Nullable<Double> interval = null) #ExcelPivotGroupingCreates date grouping metadata for a pivot field.
Parameters
- fieldName System.String
- groupBy DocumentFormat.OpenXml.Spreadsheet.GroupByValues
- startDate System.Nullable{System.DateTime} = null
- endDate System.Nullable{System.DateTime} = null
- interval System.Nullable{System.Double} = null
public static ExcelPivotGrouping DateHierarchy(String fieldName, params GroupByValues[] levels) #ExcelPivotGroupingCreates generated date hierarchy fields for a pivot field, such as years, quarters, and months.
Parameters
- fieldName System.String
- levels DocumentFormat.OpenXml.Spreadsheet.GroupByValues[]
public static ExcelPivotGrouping DateHierarchy(String fieldName, IEnumerable<GroupByValues> levels, Nullable<DateTime> startDate = null, Nullable<DateTime> endDate = null) #ExcelPivotGroupingCreates generated date hierarchy fields for a pivot field, such as years, quarters, and months.
Parameters
- fieldName System.String
- levels System.Collections.Generic.IEnumerable{DocumentFormat.OpenXml.Spreadsheet.GroupByValues}
- startDate System.Nullable{System.DateTime} = null
- endDate System.Nullable{System.DateTime} = null
public static ExcelPivotGrouping Number(String fieldName, Double interval, Nullable<Double> startNumber = null, Nullable<Double> endNumber = null) #ExcelPivotGroupingCreates numeric range grouping metadata for a pivot field.
Parameters
- fieldName System.String
- interval System.Double
- startNumber System.Nullable{System.Double} = null
- endNumber System.Nullable{System.Double} = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String FieldName { get; } #Gets the source field name.
public GroupByValues GroupBy { get; } #Gets the OpenXML grouping mode.
public Nullable<DateTime> StartDate { get; } #Gets the optional date grouping start.
public Nullable<DateTime> EndDate { get; } #Gets the optional date grouping end.
public Nullable<Double> StartNumber { get; } #Gets the optional numeric grouping start.
public Nullable<Double> EndNumber { get; } #Gets the optional numeric grouping end.
public Nullable<Double> Interval { get; } #Gets the grouping interval.
public Boolean AutoStart { get; } #Gets whether Excel should infer the start of the grouping range.
public Boolean AutoEnd { get; } #Gets whether Excel should infer the end of the grouping range.
public IReadOnlyList<GroupByValues> GeneratedDateLevels { get; } #Gets generated date hierarchy levels requested for this source field.