Community Maintained

Excel for
modern .NET
without the pain

The community-maintained fork of EPPlus that actually works on .NET 8 and .NET 9 — no broken shims, no abandoned dependencies. Create, style, chart and pivot real .xlsx files with a fluent API.

dotnet add package EPPlus.Core.CoreCompat
NuGet Downloads .NET License
sales_report.xlsx
Sheet1
ABCD
1 ProductQ1Q2Total
2 Widget A1,2001,500 =B2+C2
3 Widget B800950 =B3+C3
4 Gadget X3,4002,900 =B4+C4
5 SUM =SUM(B2:B4) =SUM(C2:C4) =SUM(D2:D4)

Everything EPPlus — on every .NET

Formatting, charts, formulas, pivot tables and more. All working on .NET 8 and 9.

Styles & Formatting

Full control over fonts, fills, borders, number formats, and conditional formatting rules — pixel-perfect output.

Charts

Embed line, bar, column, pie, doughnut, scatter, bubble, and combination charts directly in your worksheets.

Formula Engine

Server-side evaluation of 300+ Excel functions. Recalculate workbooks without opening Excel.

Tables & Pivot Tables

Create Excel ListObject tables with auto-filter, and pivot tables with grouping and calculated fields.

Data Import / Export

Load from IEnumerable<T>, DataTable, or CSV. Export with auto-sized columns and print-ready layouts.

Protection & Encryption

Password-protect worksheets or encrypt entire workbooks. Control edit permissions per cell range.

Code Examples

From zero to spreadsheet in minutes.

using OfficeOpenXml;
using System.IO;

ExcelPackage.LicenseContext = LicenseContext.NonCommercial;

using var package = new ExcelPackage();
var sheet = package.Workbook.Worksheets.Add("Sales");

// Headers
sheet.Cells[1, 1].Value = "Product";
sheet.Cells[1, 2].Value = "Q1";
sheet.Cells[1, 3].Value = "Q2";
sheet.Cells[1, 4].Value = "Total";

// Data + formula
sheet.Cells[2, 1].Value = "Widget A";
sheet.Cells[2, 2].Value = 1200;
sheet.Cells[2, 3].Value = 1500;
sheet.Cells[2, 4].Formula = "B2+C2";

sheet.Cells.AutoFitColumns();
package.SaveAs(new FileInfo("sales.xlsx"));
using OfficeOpenXml;
using System.IO;

ExcelPackage.LicenseContext = LicenseContext.NonCommercial;

using var package = new ExcelPackage(new FileInfo("sales.xlsx"));
var sheet = package.Workbook.Worksheets[0];

int rows = sheet.Dimension.Rows;
int cols = sheet.Dimension.Columns;

for (int r = 1; r <= rows; r++)
{
    for (int c = 1; c <= cols; c++)
        Console.Write($"{sheet.Cells[r, c].Value,-15}");
    Console.WriteLine();
}
using OfficeOpenXml;
using OfficeOpenXml.Drawing.Chart;

// ... setup sheet with data first ...

var chart = sheet.Drawings.AddChart("Revenue", eChartType.ColumnClustered);
chart.Title.Text = "Quarterly Revenue";
chart.SetPosition(6, 0, 1, 0);
chart.SetSize(600, 350);

var series = chart.Series.Add(
    sheet.Cells["B2:C4"],   // values
    sheet.Cells["A2:A4"]    // categories
);
series.Header = "Revenue ($)";
public record Order(int Id, string Product, decimal Amount, DateTime Date);

var orders = new List<Order>
{
    new(1, "Widget A", 120.50m, DateTime.Today),
    new(2, "Widget B",  89.99m, DateTime.Today.AddDays(-1)),
    new(3, "Gadget X", 340.00m, DateTime.Today.AddDays(-2)),
};

// Load the list — EPPlus maps property names to column headers automatically
sheet.Cells["A1"].LoadFromCollection(orders, printHeaders: true);

// Apply a date format to the Date column
sheet.Column(4).Style.Numberformat.Format = "yyyy-mm-dd";
sheet.Cells.AutoFitColumns();
using OfficeOpenXml.Style;
using System.Drawing;

// Bold green header row
using (var header = sheet.Cells[1, 1, 1, 4])
{
    header.Style.Font.Bold = true;
    header.Style.Font.Color.SetColor(Color.White);
    header.Style.Fill.PatternType = ExcelFillStyle.Solid;
    header.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(0x1D, 0x6F, 0x42));
}

// Currency format on column D
sheet.Column(4).Style.Numberformat.Format = "$#,##0.00";

// Thin border around data range
using (var data = sheet.Cells[1, 1, 5, 4])
{
    data.Style.Border.Top.Style    = ExcelBorderStyle.Thin;
    data.Style.Border.Bottom.Style = ExcelBorderStyle.Thin;
    data.Style.Border.Left.Style   = ExcelBorderStyle.Thin;
    data.Style.Border.Right.Style  = ExcelBorderStyle.Thin;
}

Framework Support

One binary. Every platform.

TargetStatusCompatible runtimes
.NET Standard 2.0 .NET Core 2.0+, .NET 5/6/7/8/9, .NET Framework 4.6.1+, Mono, Unity, Xamarin
Cross-platform by design. Targeting netstandard2.0 means a single assembly runs on Windows, Linux, and macOS without any platform-specific lock-in.

Ready to generate Excel files?

One command is all it takes.

dotnet add package EPPlus.Core.CoreCompat