Class ExcelRecordLayout<T>
How SheetWriterExtensions' WriteRecordsAsync turns a T into a
header row and one row per record. Create one with ExcelRecordLayout:
FromAttributes<T>() reflects over the record type, and
Generated<T>() uses the [ExcelSerializable] source-generated map.
public abstract class ExcelRecordLayout<T>
Type Parameters
TThe record type.
- Inheritance
-
ExcelRecordLayout<T>
- Inherited Members
Methods
WithHeaderStyle(CellStyle)
Returns a layout with the same columns whose header row is written in style.
public ExcelRecordLayout<T> WithHeaderStyle(CellStyle style)
Parameters
styleCellStyleThe style of every header cell; it replaces any column style on them.
Returns
- ExcelRecordLayout<T>
The new layout.
Exceptions
- ArgumentException
A value of
styleis out of range.