A simple library to generate excel documents representing the diff of excel documents based on EPPlus.
$ dotnet add package Chriffizient.XlsxDiffEngineXlsxDiffEngine 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.)
![]()
Add XlsxDiffEngine to your project via NuGet:
Chriffizient.XlsxDiffEngine on NuGet
dotnet add package Chriffizient.XlsxDiffEngine
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.
using XlsxDiffEngine;
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, or try out the functions via the XlsxDiffTool WPF application.