Table of Contents

Namespace ExcelReader.Core.Writer

Classes

ExcelRecordLayout

Creates ExcelRecordLayout<T> instances.

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.

ExcelRecordMapBuilder<T, TRow>

Accumulates a property-to-column write plan for T, fed either by the source generator (feature A) or by a hand-written IExcelRecordMap<T> implementation. The write-side counterpart to ExcelRowMapBuilder<T>.

ExcelTableOptions

Configures an Excel table written with BeginTable(string, IReadOnlyList<string>, ExcelTableOptions?).

ParallelSheetWriterExtensions

Record writes that format and compress batches of rows on several threads and write them in order. Memory is bounded by DegreeOfParallelism batches of BatchRows rows.

ParallelWriteOptions

Configures the parallel record writes of ParallelSheetWriterExtensions.

SheetWriterExtensions

Convenience methods layered on ISheetWriter<TRow>: write a whole collection of records to a sheet in one call, driving the start-row/write/dispose lifecycle per record.

Structs

CellStyle

A column- or row-level cell style: number format, bold, and italic. Register one with AddStyle(CellStyle).

Interfaces

IExcelCellWriter<T>

Writes a value of type T as a cell of a row, for use with the [ExcelConverter] attribute on a property that FromAttributes<T>() writes. Implement this alongside IExcelCellConverter<T> on the same converter type to round-trip a custom type through both writing (via FromAttributes<T>()) and reading (via ExcelParser<T>). A single instance is shared across every row and thread, so implementations must be stateless and thread-safe.

IExcelRecordMap<T>

Implemented by the source generator (feature A) — or by hand, before the generator runs — on the record type itself, which must be partial. Generated in the same partial as IExcelRowMap<T>, since both maps derive from the same property list and attributes.

IRowWriter

Writes one row's cells in column order, starting at the first column. Obtained from StartRowAsync(CancellationToken); each Write/Skip(int) call advances to the next column, so cells must be written left-to-right with no way to revisit an earlier column. Disposing the row writer (sync or async) finalizes the row and returns it to the sheet. Calling any member after disposal throws ObjectDisposedException.

ISheetWriter<TRow>

Writes one sheet's rows to the workbook. Obtained from AddSheet(string); a caller optionally sets column styles and widths, writes rows in order via StartRowAsync(CancellationToken), then ends the sheet. The sheet's leading structure is written when the first row starts, or at EndAsync(CancellationToken) for a sheet with no rows.

ITableSheetWriter<TRow>

A sheet writer that can write Excel tables (ranges formatted with "Format as Table"). Implemented by the XLSX and XLSB sheet writers.

IWorkbookWriter<TSheet>

Writes a whole workbook (XLSX, XLSB, XLS or CSV) to a destination stream, one sheet at a time. Implementations open the underlying stream/archive on construction, so a caller only needs to add sheets with AddSheet(string) and dispose the workbook (or call EndAsync(CancellationToken) then dispose) when finished.