Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelPivotDataField

OfficeIMO.Excel

Namespace
OfficeIMO.Excel
Assembly
OfficeIMO.Excel
Source revision
0eef6a5756b9 with working tree changes
Modifiers
sealed

Describes a data field in a pivot table (field name + aggregation).

Inheritance

  • object
  • ExcelPivotDataField

Usage

Explore 1 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 1

Constructors

ExcelPivotDataField 2 overloads
public ExcelPivotDataField(string fieldName, ExcelPivotDataFunction? function, string? displayName, uint? numberFormatId) #

Creates a pivot data field definition.

Parameters

fieldName string required
Header name from the source range.
function OfficeIMO.Excel.ExcelPivotDataFunction? required
Aggregation function (Sum, Count, Average, ...).
displayName string? required
Optional display name for the data field.
numberFormatId uint? required
Optional number format id to apply to the data field.
public ExcelPivotDataField(string fieldName, ExcelPivotDataFunction? function = null, string? displayName = null, uint? numberFormatId = null, string? numberFormat = null, ExcelPivotShowDataAs? showDataAs = null, int? baseField = null, uint? baseItem = null) #

Creates a pivot data field definition.

Parameters

fieldName string required
Header name from the source range.
function OfficeIMO.Excel.ExcelPivotDataFunction? = null optional
Aggregation function (Sum, Count, Average, ...).
displayName string? = null optional
Optional display name for the data field.
numberFormatId uint? = null optional
Optional number format id to apply to the data field.
numberFormat string? = null optional
Optional number format code to apply to the data field.
showDataAs OfficeIMO.Excel.ExcelPivotShowDataAs? = null optional
Optional show-values-as calculation mode.
baseField int? = null optional
Optional base field index for show-values-as calculations that require one.
baseItem uint? = null optional
Optional base item index for show-values-as calculations that require one.

Properties

public string FieldName { get; } #

Gets the source field name.

public ExcelPivotDataFunction Function { get; } #

Gets the aggregation function.

public string? DisplayName { get; } #

Gets the optional display name for the data field.

public uint? NumberFormatId { get; } #

Gets the optional number format id for the data field.

public string? NumberFormat { get; } #

Gets the optional number format code for the data field.

public ExcelPivotShowDataAs? ShowDataAs { get; } #

Gets the optional show-values-as calculation mode.

public int? BaseField { get; } #

Gets the optional base field index for show-values-as calculations that require one.

public uint? BaseItem { get; } #

Gets the optional base item index for show-values-as calculations that require one.