Lyo.DataTable.Models 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lyo.DataTable.Models --version 1.0.0
                    
NuGet\Install-Package Lyo.DataTable.Models -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lyo.DataTable.Models" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.DataTable.Models" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Lyo.DataTable.Models" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lyo.DataTable.Models --version 1.0.0
                    
#r "nuget: Lyo.DataTable.Models, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lyo.DataTable.Models@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lyo.DataTable.Models&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Lyo.DataTable.Models&version=1.0.0
                    
Install as a Cake Tool

Lyo.DataTable.Models

Mutable in-memory data table with sparse columns, headers, footer, thin cells, a sparse optional format map, fluent builders, and an HTML renderer. Used as the canonical tabular exchange format for Lyo.Csv, Lyo.Xlsx, and Lyo.Pdf, and for ad-hoc programmatic table construction.

This project contains all of the runtime types. The sibling Lyo.DataTable project is an empty package placeholder.

Core types

  • DataTable — sparse table with Headers, Rows, and Footer. Indexer this[int row, int col] uses row == -1 for header and row == -2 for footer. Optional formatting lives in a thread-safe sparse map: GetFormat / SetFormat / ClearFormat / Formats (snapshot). Absent key = no format (never store null). Helpers: SetHeader / SetFooter / SetCell (optional format overloads clear the map when format is null; value-only SetCell leaves an existing format), ClearCell (clears value and format), AddRow, MaxColumn. On net10.0, EnumerateRowsAsync yields body rows for await foreach (table stays fully materialised). Cell structure mutation is not itself synchronized — only the format map is concurrent-safe. One cell object per populated coordinate remains even when slim (no cell-instance pooling).
  • DataTableRow — sparse Cells dictionary keyed by column index, with SetCell / ClearCell and an indexer.
  • IDataTableCellDisplayValue, ColSpan, RowSpan only. Formatting is not on the cell.
  • DataTableCell<T> — sealed record implementing IDataTableCell; DisplayValue is Value?.ToString() ?? "". DataTableCell<string>.Empty is the shared empty cell.
  • DataTableCell (static) — non-generic helpers: Empty, FromValue(string?), FromValue(string?, colSpan, rowSpan).
  • DataTableCellFormat — sealed record of optional font/fill/align/border/number-format fields; HasAny() detects meaningful style.
  • DataTablePoolingOptionsPoolValues, PoolFormats, PoolingCellThreshold (default 512; 0 = always when enabled). Section name DataTablePooling. Create one DataTableValueInterner per parse.
  • DataTableValueInterner — parse-scoped (single-threaded) string/format interning via ordinary dictionaries, gated by pooling options. Not process-wide string.Intern.
  • DataTableToHtml.ToHtmlDocument(DataTable) — renders HTML with inline styles from the format map (not from the cell type). Honors ColSpan/RowSpan.

Fluent builders

  • DataTableBuilder — top-level builder. AddColumn(col, configure) defines conditional formatting applied to the table format map; AddHeader / AddHeaders, AddFooter / AddFooters / AddSumFooter, and AddRow overloads (including BuildAndAdd). Build() materializes the DataTable and computes sum footers.
  • DataTableRowBuilderSetCell<T>(col, value) applies column-level FormatWhen rules into the row's pending format map; AddCell accepts strings, cells, or a DataTableCellBuilder.
  • DataTableColumnBuilderWithSumFooter(); FormatWhen<T>(when, apply).
  • DataTableCellBuilder — fluent setters for format + spans; Build() returns a thin cell; BuildFormat() / Format returns the optional format for the table map.

Sum footers

AddSumFooter (or WithSumFooter on a column definition) flags a column for auto-summation. At Build() time the builder reads DisplayValue from each row's cell, trims common currency prefixes ($ £ € ¥), removes thousands separators, and parses with InvariantCulture; unparseable cells contribute 0.

I/O round-trip

Lyo.Csv and Lyo.Xlsx round-trip Headers, Rows, and Footer (Xlsx also maps footer formats at row -2). Export always writes Footer when present; import peels the last physical body row into Footer only when hasFooterRow / useFooterRow is true (default false). PDF extract still fills headers and body only.

Targeting

netstandard2.0;net10.0. No NuGet dependencies; references Lyo.Exceptions for argument validation.

Limits

Slimming cells removes format fields from each cell, but one cell object per populated coordinate remains. Value pooling helps duplicate strings, not cell instances.

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Exceptions — (direct, lyo)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Lyo.DataTable.Models:

Package Downloads
Lyo.Web.Components

Blazor components library for the Lyo web UI framework with MudBlazor integration.

Lyo.Csv.Models

CSV models and DataTable support.

Lyo.Pdf.Models

PDF models and DTOs used by the Lyo PDF processing library.

Lyo.Xlsx.Models

XLSX models (XlsxCellValue) and DataTable support.

Lyo.Reporting.Web.Components

Blazor components library for browsing report definitions, running reports, and viewing/downloading generations with MudBlazor.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 0 8/19/2026
1.0.1 132 8/18/2026
1.0.0 348 8/16/2026