API Reference
SheetBuilder
Fluent builder for composing a worksheet: headers, rows, ranges, tables, styles and filters.
Inheritance
- Object
- SheetBuilder
Methods
public SheetBuilder AddSheet(String name = "") #SheetBuilderCreates and selects a new worksheet.
Parameters
- name System.String = ""
- Optional sheet name.
public SheetBuilder AutoFilter(String range, Dictionary<UInt32, IEnumerable<String>> criteria = null) #SheetBuilderApplies AutoFilter to a range with optional per‑column criteria.
Parameters
- range System.String
- criteria System.Collections.Generic.Dictionary{System.UInt32,System.Collections.Generic.IEnumerable{System.String}} = null
public SheetBuilder AutoFit(Boolean columns, Boolean rows) #SheetBuilderAuto‑fits columns and/or rows in the current sheet.
Parameters
- columns System.Boolean
- rows System.Boolean
public SheetBuilder Cell(Int32 row, Int32 column, Object value = null, String formula = null, String numberFormat = null) #SheetBuilderWrites a cell at the specified row/column with optional value, formula and number format.
Parameters
- row System.Int32
- column System.Int32
- value System.Object = null
- formula System.String = null
- numberFormat System.String = null
public SheetBuilder Cell(String reference, Object value = null, String formula = null, String numberFormat = null) #SheetBuilderWrites a cell using A1 reference with optional value, formula and number format.
Parameters
- reference System.String
- value System.Object = null
- formula System.String = null
- numberFormat System.String = null
public SheetBuilder Columns(Action<ColumnCollectionBuilder> action) #SheetBuilderConfigures column widths and styles via the column collection builder.
Parameters
- action System.Action{OfficeIMO.Excel.Fluent.ColumnCollectionBuilder}
public SheetBuilder ConditionalColorScale(String range, Color startColor, Color endColor) #SheetBuilderAdds a 2‑color scale conditional formatting rule over the range.
Parameters
- range System.String
- startColor SixLabors.ImageSharp.Color
- endColor SixLabors.ImageSharp.Color
public SheetBuilder ConditionalDataBar(String range, Color color) #SheetBuilderAdds a data bar conditional formatting rule over the range.
Parameters
- range System.String
- color SixLabors.ImageSharp.Color
public SheetBuilder Freeze(Int32 topRows = 0, Int32 leftCols = 0) #SheetBuilderFreezes the specified number of rows and columns on the current sheet.
Parameters
- topRows System.Int32 = 0
- Number of rows at the top to freeze.
- leftCols System.Int32 = 0
- Number of columns on the left to freeze.
public SheetBuilder HeaderRow(params Object[] values) #SheetBuilderAdds a header row with the provided values.
Parameters
- values System.Object[]
public SheetBuilder Range(Int32 fromRow, Int32 fromCol, Int32 toRow, Int32 toCol, Object[] values = null) #SheetBuilderWrites a rectangular block specified by coordinates, optionally providing a 2D values array.
Parameters
- fromRow System.Int32
- fromCol System.Int32
- toRow System.Int32
- toCol System.Int32
- values System.Object[0:,0:] = null
public SheetBuilder Range(String reference, Action<RangeBuilder> action) #SheetBuilderConfigures a range using A1 notation via the range builder (styles, merges, borders, etc.).
Parameters
- reference System.String
- action System.Action{OfficeIMO.Excel.Fluent.RangeBuilder}
public SheetBuilder Row(Action<RowBuilder> action) #SheetBuilderAdds a data row configured by the supplied builder action.
Parameters
- action System.Action{OfficeIMO.Excel.Fluent.RowBuilder}
public SheetBuilder RowsFrom<T>(IEnumerable<T> data, Action<ObjectFlattenerOptions> configure = null) #SheetBuilderType Parameters
- T
Parameters
- data IEnumerable<T>
- configure Action<ObjectFlattenerOptions> = null
RowsFrom``1(System.Collections.Generic.IEnumerable{``0} data, System.Action{OfficeIMO.Excel.ObjectFlattenerOptions} configure) #Generates rows from a sequence of objects using the object flattener. Produces a header row from flattened property paths, then data rows.
Parameters
- data System.Collections.Generic.IEnumerable{``0}
- configure System.Action{OfficeIMO.Excel.ObjectFlattenerOptions}
public SheetBuilder Style(Action<StyleBuilder> action) #SheetBuilderApplies ad‑hoc styles via the style builder.
Parameters
- action System.Action{OfficeIMO.Excel.Fluent.StyleBuilder}
public SheetBuilder Table(String name, Action<TableBuilder> configure = null) #SheetBuilderAdds a table over the last added block (from RowsFrom) using the specified name.
Parameters
- name System.String
- configure System.Action{OfficeIMO.Excel.Fluent.TableBuilder} = null
public SheetBuilder Table(Action<TableBuilder> action) #SheetBuilderAdds and configures a table via the table builder.
Parameters
- action System.Action{OfficeIMO.Excel.Fluent.TableBuilder}
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object