NuvTools.Report 10.0.0

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

NuvTools.Report

A comprehensive .NET library suite for generating professional reports in multiple formats including PDF, Excel, and CSV. Build structured table-based reports with rich styling, company branding, and flexible data binding using reflection.

📦 Packages

Package Description NuGet
NuvTools.Report Core library providing the base table model infrastructure NuGet
NuvTools.Report.Pdf PDF generation using QuestPDF and PDFsharp NuGet
NuvTools.Report.Sheet Excel and CSV generation using ClosedXML NuGet

✨ Features

  • Multiple Export Formats: Generate reports as PDF (landscape A4), Excel (.xlsx), or CSV
  • Automatic Data Binding: Use reflection to populate tables from object collections
  • Rich Styling: Customize colors, fonts, and formatting
  • Company Branding: Include company logos, names, and URLs in report headers
  • Metadata Support: Add titles, filter descriptions, issue dates, and user information
  • Base64 Output: All exports return base64-encoded strings for easy API transmission
  • Multi-Table Documents: Support for multiple tables in a single document
  • DateTime Formatting: Automatic formatting of date values using custom format strings
  • PDF Merging: Utility to merge multiple PDFs into one document

🎯 Target Frameworks

  • .NET 8.0
  • .NET 9.0
  • .NET 10.0

🚀 Installation

Install the packages via NuGet Package Manager:

# For PDF export
dotnet add package NuvTools.Report.Pdf

# For Excel/CSV export
dotnet add package NuvTools.Report.Sheet

# Or install the base library only
dotnet add package NuvTools.Report

📖 Usage

Basic Example - PDF Export

using NuvTools.Report.Table.Models;
using NuvTools.Report.Table.Models.Components;
using NuvTools.Report.Pdf.Table;

// Define your data model
var products = new List<Product>
{
    new Product { Id = 1, Name = "Product A", Price = 29.99m, Date = DateTime.Now },
    new Product { Id = 2, Name = "Product B", Price = 49.99m, Date = DateTime.Now }
};

// Define columns
var columns = new List<Column>
{
    new Column { Name = "Id", Label = "ID", Order = 1, Format = "" },
    new Column { Name = "Name", Label = "Product Name", Order = 2, Format = "" },
    new Column { Name = "Price", Label = "Price", Order = 3, Format = "C2" },
    new Column { Name = "Date", Label = "Date", Order = 4, Format = "yyyy-MM-dd" }
};

// Create a table
var table = new Table
{
    Info = new Info
    {
        Name = "Products",
        Title = "Product Catalog",
        CompanyAbbreviation = "ACME Corp",
        CompanyUrl = "https://acme.com",
        FilterDescription = "All Products",
        IssueDate = DateTime.Now,
        IssueUser = "john.doe"
    },
    Style = new Style
    {
        BackgroundHeaderColor = "#003366",
        FontHeaderColor = "#FFFFFF"
    },
    Content = new Body()
};

// Populate rows using reflection
table.SetRows(columns, products);

// Create document
var document = new Document
{
    BackgroundDocumentHeaderColor = "#003366",
    Tables = [table]
};

// Export to PDF (returns base64 string)
string pdfBase64 = document.ExportFirstSheetToPdf();

// Or export all tables
List<string> allPdfs = document.ExportSheetToPdf();

Excel Export

using NuvTools.Report.Sheet.Extensions;

// Using the same document structure from above
string excelBase64 = document.ExportToExcel();

// Save to file
byte[] excelBytes = Convert.FromBase64String(excelBase64);
File.WriteAllBytes("report.xlsx", excelBytes);

CSV Export

using NuvTools.Report.Sheet.Extensions;

// Export all tables to CSV
List<string> csvFiles = document.ExportToCsv();

// Or export first table only
string csvBase64 = document.ExportFirstSheetToCsv();

PDF Merging

using NuvTools.Report.Pdf.Util;

var pdf1 = Convert.FromBase64String(pdfBase64String1);
var pdf2 = Convert.FromBase64String(pdfBase64String2);

byte[] mergedPdf = PdfUtil.Merge([pdf1, pdf2]);

🏗️ Architecture

The library uses a hierarchical document-table-component structure:

Document
└── Tables (List<Table>)
    ├── Info (metadata: name, title, company info, issue date/user)
    ├── Style (formatting: colors, fonts)
    └── Content (Body)
        ├── Header
        │   └── Columns (List<Column>)
        └── Rows (List<Row>)
            └── Cells (List<Cell>)

Key Components

  • Document: Top-level container with background color and table list
  • Table: Individual table with Info, Style, and Content
  • Column: Column definition with property name (for reflection), label, order, and format
  • Row/Cell: Data rows containing cells with values
  • Info: Metadata including title, company details, filter description, issue info
  • Style: Formatting properties (colors, fonts, etc.)

🔧 Dependencies

NuvTools.Report.Pdf

  • QuestPDF (2025.7.4)
  • PDFsharp (6.2.3)

NuvTools.Report.Sheet

  • ClosedXML (0.105.0)

📝 License

This project requires license acceptance. See the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.


Copyright © 2025 Nuv Tools

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on NuvTools.Report:

Package Downloads
NuvTools.Report.Pdf

Helper report library to work with PDF.

NuvTools.Report.Sheet

Helper report library to work with Excel/CSV.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0 264 12/6/2025
9.1.1 884 5/26/2025
9.1.0 220 5/23/2025
9.0.0 191 11/13/2024
8.0.3 267 3/5/2024
7.0.0 506 3/10/2023
6.5.0 494 10/24/2022