FrostNova.Core.TableWork 1.1.1

dotnet add package FrostNova.Core.TableWork --version 1.1.1
                    
NuGet\Install-Package FrostNova.Core.TableWork -Version 1.1.1
                    
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="FrostNova.Core.TableWork" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FrostNova.Core.TableWork" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="FrostNova.Core.TableWork" />
                    
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 FrostNova.Core.TableWork --version 1.1.1
                    
#r "nuget: FrostNova.Core.TableWork, 1.1.1"
                    
#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 FrostNova.Core.TableWork@1.1.1
                    
#: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=FrostNova.Core.TableWork&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=FrostNova.Core.TableWork&version=1.1.1
                    
Install as a Cake Tool

FrostNova.Core.TableWork

A robust, high-performance C# library designed to synchronize data between application objects and various external formats (Excel, CSV, JSON, HTML).

Unlike standard serializers, this library is built around a Column-Mapping Architecture, allowing for safe data round-trips even when users modify file structures or formats.

Key Features

  • Smart Excel Integration:

  • Export: Generates styled Excel files or HTML snippets (CF_HTML) for pixel-perfect copy-pasting.

  • Import: Maps Excel columns to application properties by Header Name, making it resilient to column reordering by users.

  • Universal Formats: Full support for CSV, TSV, and JSON.

  • Type-Safe Conversion: Uses a centralized TableColumn system to handle type conversion, formatting, and validation across all input/output channels.

  • Memory Efficient: Utilizes stream-based parsing for large CSV/TSV files to maintain a low memory footprint.


Core Architecture

The library operates on a three-tier abstraction:

  1. ITableObject: The data container interface. It manages rows and defines which columns are targeted.
  2. TableColumn: The brain of the operation. It defines how a specific property is converted to text (for CSV), formatted for Excel (as an object), or parsed back from a string.
  3. TableDataProcessor: The static engine that executes the import/export logic.

Usage Examples

1. Exporting to Excel with Styles

TableDataProcessor.OutputToExcel(
    myTable, 
    "Report.xlsx", 
    fontFamily: "Segoe UI", 
    fontSize: 10,
    withHeader: true,
    borderColor: Color.Gray,
    columnBackColor: Color.LightBlue,
    columnForeColor: Color.Black,
    nullText: "-",
    isBoldColumnText: true
);

2. Importing from a User-Edited Excel File

This method identifies columns by their header names, automatically skipping unknown columns or handling reordered ones.

TableDataProcessor.ImportFromExcel(
    myTable, 
    "UserEditedData.xlsx", 
    startRow: 0, 
    hasHeader: true
);

3. Copy-Paste Support (Excel-Friendly HTML)

Generate a clipboard-compatible string that maintains colors and data types when pasted into Excel.

string htmlData = TableDataProcessor.CreateCopyTextAsHtml(
    myTable,
    columnBackColor: Color.Navy,
    columnForeColor: Color.White,
    nullForeColor: Color.Red,
    nullText: "N/A",
    isWrapColumnText: false,
    isBoldColumnText: true
);
Clipboard.SetText(htmlData);

4. JSON Serialization

string json = TableDataProcessor.ToJson(myTable, indented: true);


Implementation Notes

When implementing TableColumn, ensure you provide logic for:

  • GetTextValue: For flat text formats (CSV/TSV).
  • GetExcelValue: For typed Excel cells (Preserves DateTime, int, etc.).
  • SetValueFromText: For parsing clipboard or CSV strings.
  • SetValueFromExcel: For processing raw objects from Excel cells.

Would you like me to add a specific "Getting Started" guide for developers who need to implement the ITableObject interface?

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 104 2/23/2026
1.1.0 105 2/23/2026
1.0.0 103 2/11/2026
0.0.10 107 2/23/2026
0.0.9 100 2/11/2026
0.0.8 204 11/3/2025
0.0.7 200 11/3/2025
0.0.6 165 9/28/2025
0.0.5 189 9/25/2025
0.0.4 186 8/11/2025
0.0.3 153 7/31/2025