Chriffizient.ExcelDiffEngine
0.2.0
dotnet add package Chriffizient.ExcelDiffEngine --version 0.2.0
NuGet\Install-Package Chriffizient.ExcelDiffEngine -Version 0.2.0
<PackageReference Include="Chriffizient.ExcelDiffEngine" Version="0.2.0" />
paket add Chriffizient.ExcelDiffEngine --version 0.2.0
#r "nuget: Chriffizient.ExcelDiffEngine, 0.2.0"
// Install Chriffizient.ExcelDiffEngine as a Cake Addin #addin nuget:?package=Chriffizient.ExcelDiffEngine&version=0.2.0 // Install Chriffizient.ExcelDiffEngine as a Cake Tool #tool nuget:?package=Chriffizient.ExcelDiffEngine&version=0.2.0
ExcelDiffEngine
ExcelDiffEngine is a simple C# library for comparing Excel (.xlsx) files. It provides powerful configuration options to customize data comparisons, allowing you to generate annotated output files that highlight all changes, additions, and removals. (For reading and writing Excel files, the EPPlus library is used.)
Features
- Flexible comparison options: Configure key columns, secondary key columns, ignored columns, group columns, text-only comparison columns, and more.
- Customizable data handling: Define data ranges, set merging options, add skip rules, apply modification rules, or manage individual requirements with callbacks.
- Visual change indicators: Highlight changes, additions, and deletions in the output using different cell styling and comment options.
- Configurable output: Customize headers, auto-fit columns, freeze panes, and apply auto-filters for enhanced readability.
Installation
Add ExcelDiffEngine to your project via NuGet:
dotnet add package Chriffizient.ExcelDiffEngine
Getting Started
Basic Usage
Use the ExcelDiffBuilder
to set up Excel files and key columns.
Adjust other comparison options like value changed markers, ignored columns, modification rules, and styling preferences.
Use the Build
method to save an annotated comparison Excel output file.
Example
using ExcelDiffEngine;
using OfficeOpenXml;
new ExcelDiffBuilder()
.AddFiles(x => x
.SetOldFile(oldFileStream, "OldFile.xlsx")
.SetNewFile(newFileStream, "NewFile.xlsx")
)
.SetKeyColumns("ID") // Optional
.Build("ComparisonOutput.xlsx");
For more examples, take a look at the tests.
Dependencies
- EPPlus - for Excel file handling in .NET (Depending on the usage, a paid license can be required)
Product | Versions 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. |
-
net8.0
- EPPlus (>= 7.4.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.