OfficeIMO

API Reference

Class

ColumnComposer

Namespace OfficeIMO.Excel.Fluent.SheetComposer
Assembly OfficeIMO.Excel
Modifiers sealed

Column-scoped composer used by [[cref:OfficeIMO.Excel.Fluent.SheetComposer.ColumnComposer.Columns(System.Int32,System.Action{OfficeIMO.Excel.Fluent.SheetComposer.ColumnComposer[]},System.Int32,System.Int32,OfficeIMO.Excel.Fluent.OverflowMode)]] to write simple sections into a single column while keeping track of vertical position.

Inheritance

  • Object
  • ColumnComposer

Methods

public ColumnComposer BulletedList(IEnumerable<String> items) #
Returns: ColumnComposer

Writes a bullet for each item (• text) in this column.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
public ColumnComposer Columns(Int32 count, Action<ColumnComposer[]> configure, Int32 columnWidth = 3, Int32 gutter = 1, OverflowMode overflow = Throw) #
Returns: ColumnComposer

Splits the current column region into horizontal sub-columns, rendering each via a nested ColumnComposer. Advances the parent column by the tallest child block and applies a spacer afterwards.

Parameters

count System.Int32 requiredposition: 0
Number of sub-columns to create.
configure System.Action{OfficeIMO.Excel.Fluent.SheetComposer.ColumnComposer[]} requiredposition: 1
Callback receiving the nested ColumnComposer instances.
columnWidth System.Int32 = 3 optionalposition: 2
Width per sub-column in grid columns.
gutter System.Int32 = 1 optionalposition: 3
Spacing between sub-columns in grid columns.
overflow OfficeIMO.Excel.Fluent.OverflowMode = Throw optionalposition: 4
Specifies how content that exceeds the allocated width should be handled.
public ColumnComposer KeyValue(String key, Object value) #
Returns: ColumnComposer

Writes a two-column key/value row with styled key cell.

Parameters

key System.String requiredposition: 0
value System.Object requiredposition: 1
public ColumnComposer KeyValues(IEnumerable<ValueTuple<String, Object>> pairs) #
Returns: ColumnComposer

Writes multiple key/value rows in order.

Parameters

pairs System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.Object}} requiredposition: 0
public ColumnComposer Paragraph(String text) #
Returns: ColumnComposer

Writes a single paragraph cell and advances the row.

Parameters

text System.String requiredposition: 0
public ColumnComposer Section(String text) #
Returns: ColumnComposer

Writes a section header cell using the current theme's section style.

Parameters

text System.String requiredposition: 0
public ColumnComposer Spacer(Int32 rows = 1) #
Returns: ColumnComposer

Adds vertical space.

Parameters

rows System.Int32 = 1 optionalposition: 0
Number of rows to skip (minimum 1).
public String TableFrom<T>(IEnumerable<T> items, String title = null, Action<ObjectFlattenerOptions> configure = null, TableStyle style = TableStyleMedium9, Boolean autoFilter = true, Action<TableVisualOptions> visuals = null) #
Returns: String

Type Parameters

T

Parameters

items IEnumerable<T> requiredposition: 0
title String = null optionalposition: 1
configure Action<ObjectFlattenerOptions> = null optionalposition: 2
style TableStyle = TableStyleMedium9 optionalposition: 3
autoFilter Boolean = true optionalposition: 4
visuals Action<TableVisualOptions> = null optionalposition: 5
TableFrom``1(System.Collections.Generic.IEnumerable{``0} items, System.String title, System.Action{OfficeIMO.Excel.ObjectFlattenerOptions} configure, OfficeIMO.Excel.TableStyle style, System.Boolean autoFilter, System.Action{OfficeIMO.Excel.Fluent.TableVisualOptions} visuals) #

Renders a table inside this column starting at the current row and returns the A1 range. This variant avoids freezing panes to prevent conflicts when multiple tables are placed per sheet.

Parameters

items System.Collections.Generic.IEnumerable{``0} required
title System.String required
configure System.Action{OfficeIMO.Excel.ObjectFlattenerOptions} required
style OfficeIMO.Excel.TableStyle required
autoFilter System.Boolean required
visuals System.Action{OfficeIMO.Excel.Fluent.TableVisualOptions} required

Properties

public Int32 RowsUsed { get; } #

Total number of rows consumed by this column since it was created.

public Int32 ColumnsUsed { get; } #

Total number of sheet columns used by this column content (>=1).