Pro.Reporting.Core 1.1.0

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

A comprehensive .NET reporting library with support for PDF, Excel, CSV, and HTML exports. Features library-agnostic Excel abstraction, template file loading, and fully customizable templates.

Installation

dotnet add package Pro.Reporting.Core

Quick Start

PDF Export

using Reporting.Core;
using Reporting.Core.Exporters;
using Reporting.Core.Interfaces;
using Reporting.Core.Models;

var report = new ReportDefinition
{
    Title = "Sales Report",
    Columns = new List<string> { "Region", "Product", "Sales" },
    DataSource = new MyDataSource()
};

var exporter = new PdfExporter();
var engine = new ReportEngine();

using var output = File.Create("report.pdf");
engine.Generate(report, exporter, output);

Excel Export

var exporter = new ExcelExporter();
using var output = File.Create("report.xlsx");
engine.Generate(report, exporter, output);

CSV Export

var exporter = new CsvExporter();
using var output = File.Create("report.csv");
engine.Generate(report, exporter, output);

HTML Export

var exporter = new HtmlExporter();
using var output = File.Create("report.html");
engine.Generate(report, exporter, output);

Generate as Byte Array

For scenarios where you need the report as a byte array (e.g., Web APIs, email attachments, database storage):

var exporter = new PdfExporter();
byte[] reportBytes = engine.GenerateAsBytes(report, exporter);

// Use cases:
// - Return from Web API
// - Send as email attachment
// - Store in database as BLOB
// - Upload to cloud storage
File.WriteAllBytes("report.pdf", reportBytes);

Features

Multiple Export Formats

  • 📄 PDF - Professional reports with QuestPDF
  • 📊 Excel - Rich formatting with EPPlus (swappable)
  • 📋 CSV - Simple data export
  • 🌐 HTML - Web-ready reports

🎨 Template System

  • Built-in templates for quick start
  • Custom template creation via IPdfTemplate and IExcelTemplate
  • Template registry for reusability
  • Excel template file loading

🔧 Library Abstraction

  • Swap Excel libraries without code changes
  • Provider pattern for flexibility
  • Future-proof architecture

Custom Templates

PDF Template

public class MyPdfTemplate : IPdfTemplate
{
    public void Apply(IDocumentContainer container, ReportDefinition report)
    {
        container.Page(page =>
        {
            page.Size(PageSizes.A4);
            page.Content().Column(column =>
            {
                column.Item().Text(report.Title).FontSize(20).Bold();
                // Add your custom layout here
            });
        });
    }
}

// Use it
var exporter = new PdfExporter(new MyPdfTemplate());

Excel Template

public class MyExcelTemplate : IExcelTemplateV2
{
    public void Apply(IWorkbook workbook, ReportDefinition report)
    {
        var sheet = workbook.CreateSheet(report.Title);
        // Add your custom styling and layout here
    }
}

// Use it
var exporter = new ExcelExporter(new MyExcelTemplate());

Excel Template File Loading

Load and populate pre-designed Excel templates:

var report = new ReportDefinition
{
    TemplateFilePath = "Templates/MyTemplate.xlsx",
    DataRangeName = "DATA_TABLE",
    DataSource = new MyDataSource()
};

var exporter = new TemplateBasedExcelExporter();
using var output = File.Create("report.xlsx");
engine.Generate(report, exporter, output);

Documentation

For comprehensive guides and examples, visit the GitHub repository.

Requirements

  • .NET 9.0 or later
  • QuestPDF (automatically included)
  • EPPlus 7.5.2 (automatically included)

License

MIT License

Dependencies

  • QuestPDF - PDF generation (Community license)
  • EPPlus - Excel generation (NonCommercial license or commercial)

Note: EPPlus requires a commercial license for commercial use. You can swap to ClosedXML, NPOI, or MiniExcel using the provider pattern.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.

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.0 155 1/25/2026
1.0.1 233 11/26/2025
1.0.0 221 11/25/2025

v1.1.0:
   - Added support for ClosedXML as a free, full-featured Excel provider.
   - Added support for MiniExcel as a high-performance Excel provider.
   - Implemented a provider-agnostic IExcelLibraryProvider abstraction.