Table of Contents

Namespace SheetStream

Classes

CellCollection

Indexer over a sheet's cells for random access. See Cells.

ChartSeries

One data series of a chart.

ColumnRangeSettings

Applies settings to a contiguous range of columns. Obtain through Columns(int, int). Each call fans out to the individual ColumnSettings; the writer later coalesces identical neighbours back into ranges.

ColumnSettings

Width, visibility and default style of one worksheet column. Obtain through Column(int); settings must be made before the sheet's first row is written.

ConditionalFormatting

Conditional formatting rules over one range. Create through AddConditionalFormatting(string) and chain any number of rules; earlier rules win when several match (Excel priority order).

DataValidation

A data validation rule over one range: a drop-down list, number or date bounds, text length, or a custom formula. Create through AddDataValidation(string), then pick exactly one rule method and optionally add a prompt and error message.

DefinedName

A workbook-level or sheet-level defined name (named range or named formula).

DefinedNameCollection

Defined names of a workbook. Add them any time before the package is saved.

ExcelCell

One cell in random-access mode.

ExcelChart

A chart placed on a worksheet, referencing data already on a sheet. Create with AddChart(ChartType, string), then add series. The chart reads the cells when Excel opens the file.

ExcelPackage

The .xlsx container. Owns the zip archive, streams each worksheet into it as the sheet is written, and on Save() emits the trailing parts (shared strings, styles, workbook, relationships and content types) that can only be known once every sheet is complete.

ExcelPicture

A picture placed on a worksheet. Create with AddPicture(byte[], int, int, int?, int?, string?).

ExcelTable

An Excel table (ListObject): a named, styled range with filter buttons and banded rows that formulas can address by name (Sales[Revenue]). Create with AddTable(string, string, IReadOnlyList<string>?).

LoadOptions

Options for LoadFromCollection<T>(IEnumerable<T>, LoadOptions?), LoadFromDataTable(DataTable, LoadOptions?) and LoadFromDataReader(IDataReader, LoadOptions?).

PackageOptions

Tuning knobs for an ExcelPackage. All defaults favour correctness and small files.

PageSetup

Print settings of a worksheet. Everything here can be set any time before the sheet is sealed, except FitToWidth and FitToHeight, which Excel stores in the sheet header and so must be set before the first row is written.

PivotTable

A pivot table summarising a range (or an Excel table) written earlier in the same workbook. Create it with AddPivotTable(string, string, string, int, int, IReadOnlyList<string>) or AddPivotTable(string, ExcelTable, int, int), then place source columns on the row, column, filter and data areas by their header text.

RichText

One formatted run of text inside a rich-text cell. Unset properties inherit the cell's font.

RowOptions

Formatting of a whole row, for Row(int, RowOptions?).

RowWriter

Writes the cells of the current row, left to right. One instance exists per worksheet and is reused for every row, so writing a cell allocates nothing beyond what the XML writer buffers.

SharedStringTable

The workbook-wide shared string table (SST). Every distinct string is stored once and cells refer to it by index, which is both what the specification recommends and what keeps repeated values (status codes, category names, customer names) from bloating the file.

SheetColumnAttribute

Controls how a property is exported by LoadFromCollection<T>(IEnumerable<T>, LoadOptions?) and matched by ExcelReader.Read<T>.

SheetMappers

Registry of compile-time row mappers. LoadFromCollection<T>, LoadFromAsyncEnumerable<T> and ExcelReader.Read<T> look here first and only fall back to reflection when no mapper is registered. Types marked with SheetRowAttribute register themselves at module load on .NET 5 and later; on .NET Framework call the generated RegisterSheetMapper() at start-up.

SheetProtectionOptions

What users may still do on a protected sheet. Everything is blocked by default except selecting cells, matching Excel's "Protect Sheet" dialog. Cells styled with Protection.Locked = false stay editable.

SheetRowAttribute

Marks a partial class or struct whose column mapping is generated at compile time by the SheetStream source generator (shipped inside the SheetStream package). The generator adds a static SheetMapper property implementing ISheetRowMapper<T> and, on .NET 5 and later, registers it automatically so LoadFromCollection and ExcelReader.Read<T> need no reflection: the type then works when trimmed or published with Native AOT.

Workbook

The logical workbook: a collection of worksheets plus the style sheet, shared string table, defined names and document properties they share. There is exactly one workbook per ExcelPackage.

WorkbookProperties

Document properties shown in File, Info and written to docProps/core.xml / app.xml.

Worksheet

A worksheet being streamed into the package. Rows are written forward-only through Row() / Row(int); layout settings that the schema places before the sheet data (column widths, frozen panes, tab colour) must be declared before the first row, unless AutoFitColumns(double, double) or random-access Cells are used, which defer the header.

WorksheetCollection

The worksheets of a workbook. Adding a sheet seals the previous one, because the package streams one sheet at a time straight into the zip archive.

Structs

LoadResult

The cells a load call wrote, for follow-up formatting such as charts or totals.

Interfaces

ISheetRowMapper<T>

Describes how a type maps to worksheet columns and moves values in both directions without reflection. LoadFromCollection uses it to write rows and ExcelReader.Read<T> to bind them back. Implementations are generated at compile time for types marked with SheetRowAttribute, but a hand-written mapper works just as well; register it with Register<T>(ISheetRowMapper<T>) or pass it to the explicit overloads.

Enums

ChartDataLabels

Labels drawn on data points.

ChartType

Chart kinds supported by AddChart(ChartType, string).

ConditionalOperator

Comparison of a "cell value" conditional formatting rule.

IconSetType

Built-in icon sets for IconSet(IconSetType, bool, bool).

LegendPosition

Where the chart legend sits.

PageOrientation

Printed page orientation.

PaperSize

Common paper sizes; values are the ECMA-376 paper size codes.

PivotFunction

Aggregation applied by a pivot data field (AddDataField(string, PivotFunction, string?, string?)).

SheetVisibility

Visibility of a worksheet tab.

ValidationErrorStyle

How Excel reacts to a value that fails validation.

ValidationOperator

Comparison used by numeric, date and text-length validations.