OfficeIMO

API Reference

Class

ObjectFlattenerOptions

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel

Configuration for flattening objects into key/value pairs where keys represent dotted paths.

Inheritance

  • Object
  • ObjectFlattenerOptions

Constructors

public ObjectFlattenerOptions() #

Methods

public ObjectFlattenerOptions Exclude(params String[] properties) #
Returns: ObjectFlattenerOptions

Appends to ExcludeProperties while preserving uniqueness.

Parameters

properties System.String[] requiredposition: 0
public ObjectFlattenerOptions Include(params String[] properties) #
Returns: ObjectFlattenerOptions

Appends to IncludeProperties while preserving uniqueness.

Parameters

properties System.String[] requiredposition: 0
public ObjectFlattenerOptions Order(String[] pinFirst = null, String[] priority = null, String[] pinLast = null) #
Returns: ObjectFlattenerOptions

One-call convenience: set pin-first, priority order, and pin-last. Any argument may be null; order is applied as PinFirst → PriorityOrder → PinLast.

Parameters

pinFirst System.String[] = null optionalposition: 0
priority System.String[] = null optionalposition: 1
pinLast System.String[] = null optionalposition: 2
public ObjectFlattenerOptions PinFirst(params String[] paths) #
Returns: ObjectFlattenerOptions

Adds or appends to PinnedFirst while preserving order and uniqueness.

Parameters

paths System.String[] requiredposition: 0
public ObjectFlattenerOptions PinLast(params String[] paths) #
Returns: ObjectFlattenerOptions

Adds or appends to PinnedLast while preserving order and uniqueness.

Parameters

paths System.String[] requiredposition: 0
public ObjectFlattenerOptions PriorityOrder(params String[] paths) #
Returns: ObjectFlattenerOptions

Sets priority order 1..N for the provided paths (full path or property name).

Parameters

paths System.String[] requiredposition: 0

Properties

public List<String> ExpandProperties { get; } #

Property names or dotted paths to expand (descend into) rather than treat as simple values.

public Boolean IncludeFullObjects { get; set; } #

When true, includes the original object under its path in addition to expanded fields.

public Int32 MaxDepth { get; set; } #

Maximum recursion depth when expanding nested objects.

public HeaderCase HeaderCase { get; set; } #

Header casing strategy for generated column names.

public String[] HeaderPrefixTrimPaths { get; set; } #

Optional prefixes to trim from generated headers.

public String[] Columns { get; set; } #

Optional explicit column whitelist (dotted paths).

public String[] Ignore { get; set; } #

Paths to exclude from output.

public String[] IncludeProperties { get; set; } #

Optional convenience include list using property names or dotted paths. When specified, only matching columns are kept. A match occurs when the full dotted path matches or the last segment (property name) matches case-insensitively. This is a friendlier alias for Columns.

public String[] ExcludeProperties { get; set; } #

Optional convenience exclude list using property names or dotted paths. A match occurs when the full dotted path matches or the last segment (property name) matches case-insensitively. This augments Ignore which treats values as dotted-path prefixes.

public String[] PinnedFirst { get; set; } #

Optional list of dotted paths to pin to the front of the generated column order when Columns is not specified. Matching paths keep the specified order; any non-matching paths follow in natural order.

public String[] PinnedLast { get; set; } #

Optional list of dotted paths to pin to the end of the generated column order. Processed after PinnedFirst.

public Dictionary<String, Int32> PropertyPriority { get; } #

Optional per-column priority ordering. Lower numbers appear earlier. Keys can be dotted paths or property names. When not specified, relative discovery order is preserved. Applied after PinnedFirst and before PinnedLast.

public NullPolicy NullPolicy { get; set; } #

How null values are represented.

public Dictionary<String, Object> DefaultValues { get; } #

Per‑path default values used when DefaultValue is selected.

public Dictionary<String, Func<Object, Object>> Formatters { get; } #

Per‑path formatting delegates applied to values.

public CollectionMode CollectionMode { get; set; } #

How to handle collections.

public String CollectionJoinWith { get; set; } #

Delimiter used when JoinWith is selected.

public Dictionary<String, CollectionColumnMapping> CollectionMapColumns { get; } #

Maps collection paths (e.g., "ScoreBreakdown") to dynamic columns using element properties. Example: map path "ScoreBreakdown" with KeyProperty="Name", ValueProperty="Value" to produce columns like "ScoreBreakdown.HasMX" = 2, "ScoreBreakdown.EffectiveSPFSends" = 2.