Unio.Core
1.0.1
dotnet add package Unio.Core --version 1.0.1
NuGet\Install-Package Unio.Core -Version 1.0.1
<PackageReference Include="Unio.Core" Version="1.0.1" />
<PackageVersion Include="Unio.Core" Version="1.0.1" />
<PackageReference Include="Unio.Core" />
paket add Unio.Core --version 1.0.1
#r "nuget: Unio.Core, 1.0.1"
#:package Unio.Core@1.0.1
#addin nuget:?package=Unio.Core&version=1.0.1
#tool nuget:?package=Unio.Core&version=1.0.1
Unio.Core
One API, every format. Extract typed data from Excel, CSV, PDF, JSON, and XML in C#.
Installation
dotnet add package Unio.Core # Core + CSV
dotnet add package Unio.Excel # Add Excel support
dotnet add package Unio.Pdf # Add PDF support
dotnet add package Unio.Json # Add JSON support
dotnet add package Unio.Xml # Add XML support
dotnet add package Unio.Validation # Add validation support
The core package has zero external dependencies and includes CSV support out of the box.
Quick Start
using Unio;
// Define your model
public class Invoice
{
[Column("Invoice Number")]
public string InvoiceNumber { get; set; }
[Column("Amount")]
public decimal Amount { get; set; }
[Column("Date")]
[DateFormat("yyyy-MM-dd")]
public DateTime Date { get; set; }
}
// Extract data - format is auto-detected
var unio = new Unio();
var invoices = unio.Extract<Invoice>("invoices.csv");
foreach (var invoice in invoices)
{
Console.WriteLine($"{invoice.InvoiceNumber}: {invoice.Amount:C}");
}
Dependency Injection
builder.Services.AddUnio();
// Then inject IUnioExtractor
public class MyService(IUnioExtractor extractor)
{
public IEnumerable<Invoice> Import(string path)
=> extractor.Extract<Invoice>(path);
}
Streaming Large Files
await foreach (var invoice in unio.ExtractAsync<Invoice>("large-file.csv"))
{
// Process one row at a time - constant memory usage
}
Key Features
- Unified API - Same
Extract<T>()call for CSV, Excel, PDF, JSON, XML - Auto-detection - Format detected from file content (magic bytes) and extension
- Attribute mapping -
[Column],[Ignore],[DateFormat]for flexible mapping - Streaming -
IAsyncEnumerable<T>support for memory-efficient processing - DI-first - Built-in
AddUnio()for Microsoft.Extensions.DependencyInjection - Zero dependencies - Core library has no external package dependencies
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Unio.Core:
| Package | Downloads |
|---|---|
|
Unio.Xml
XML data extraction plugin for the Unio library. Extract strongly-typed data from XML documents with element and XPath-based extraction. Built on System.Xml.Linq with zero additional dependencies beyond the Unio core. |
|
|
Unio.Excel
Excel (XLSX/XLS) data extraction plugin for the Unio library. Read strongly-typed data from Excel spreadsheets with automatic column mapping, sheet selection, and streaming support. Built on DocumentFormat.OpenXml for reliable, high-performance Excel processing. |
|
|
Unio.Json
JSON data extraction plugin for the Unio library. Extract strongly-typed data from JSON arrays and objects with automatic property mapping. Built on System.Text.Json with zero additional dependencies beyond the Unio core. |
|
|
Unio.Pdf
PDF table data extraction plugin for the Unio library. Extract strongly-typed data from PDF tables with automatic column detection and row parsing. Built on PdfPig for reliable, open-source PDF processing without commercial dependencies. |
|
|
Unio.Validation
Validation plugin for the Unio library. Validate extracted data using DataAnnotations and fluent validation rules. Supports multiple error handling modes: throw on first error, skip and continue, or collect all errors. Zero additional dependencies beyond the Unio core. |
GitHub repositories
This package is not used by any popular GitHub repositories.