FreePPlus.LgplLicenseForever 1.0.100

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

FreePPlus

Create advanced Excel spreadsheets using .NET, without the need of interop.

FreePPlus is a .NET library that reads and writes Excel files using the Office Open XML format (xlsx). FreePPlus has one third-party dependency - the CodeBrix.Imaging package for image and font handling. It also depends on a few Microsoft.Extensions and System.Security.Cryptography packages.

FreePPlus is provided as a .NET 10 library and associated FreePPlus.LgplLicenseForever NuGet package. FreePPlus supports applications and assemblies that target Microsoft .NET version 10.0 and later.

Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.

FreePPlus is a fork of the code of the popular EPPlus library version 4.5.3.3 - see below for licensing details.

FreePPlus supports:

  • Cell Ranges
  • Cell styling (Border, Color, Fill, Font, Number, Alignments)
  • Data validation
  • Conditional formatting
  • Charts
  • Pictures
  • Shapes
  • Comments
  • Tables
  • Pivot tables
  • Protection
  • Encryption
  • VBA
  • Formula calculation
  • Many more...

Sample Code

Create a New Excel File

using OfficeOpenXml;
using OfficeOpenXml.Style;
using OfficeOpenXml.Table;

// Create a new workbook and add a worksheet
using var package = new ExcelPackage();
var ws = package.Workbook.Worksheets.Add("Sales Report");

// Add headers
ws.Cells["A1"].Value = "Product";
ws.Cells["B1"].Value = "Quantity";
ws.Cells["C1"].Value = "Unit Price";
ws.Cells["D1"].Value = "Total";

// Add data
ws.Cells["A2"].Value = "Widget";
ws.Cells["B2"].Value = 25;
ws.Cells["C2"].Value = 3.50;

ws.Cells["A3"].Value = "Gadget";
ws.Cells["B3"].Value = 10;
ws.Cells["C3"].Value = 12.99;

ws.Cells["A4"].Value = "Gizmo";
ws.Cells["B4"].Value = 50;
ws.Cells["C4"].Value = 1.75;

// Add formulas
ws.Cells["D2:D4"].Formula = "B2*C2";

// Style the header row
using (var range = ws.Cells["A1:D1"])
{
    range.Style.Font.Bold = true;
    range.Style.Fill.PatternType = ExcelFillStyle.Solid;
    range.Style.Fill.BackgroundColor.SetColor(0, 0, 51, 102);    // dark blue
    range.Style.Font.Color.SetColor(255, 255, 255, 255);         // white
}

// Format currency columns
ws.Cells["C2:D4"].Style.Numberformat.Format = "#,##0.00";

// Auto-fit column widths
ws.Cells["A1:D4"].AutoFitColumns();

// Save to a file
package.SaveAs(new FileInfo("SalesReport.xlsx"));

Open and Read an Existing File

using OfficeOpenXml;

using var package = new ExcelPackage(new FileInfo("SalesReport.xlsx"));
var ws = package.Workbook.Worksheets["Sales Report"];

// Read cell values
for (int row = 2; row <= 4; row++)
{
    var product = ws.Cells[row, 1].Text;
    var quantity = ws.Cells[row, 2].GetValue<int>();
    Console.WriteLine($"{product}: {quantity} units");
}

Load Data from a Collection

using OfficeOpenXml;
using OfficeOpenXml.Table;

var inventory = new[]
{
    new { Sku = "A100", Name = "Hammer", Stock = 37, Price = 12.10m },
    new { Sku = "A101", Name = "Nails",  Stock = 500, Price = 3.99m },
    new { Sku = "A102", Name = "Saw",    Stock = 12, Price = 15.37m },
};

using var package = new ExcelPackage();
var ws = package.Workbook.Worksheets.Add("Inventory");

// Load collection with headers and a table style
ws.Cells["A1"].LoadFromCollection(inventory, true, TableStyles.Medium6);
ws.Cells["A1:D1"].AutoFitColumns();

package.SaveAs(new FileInfo("Inventory.xlsx"));

Add Formulas and Calculate

using OfficeOpenXml;

using var package = new ExcelPackage();
var ws = package.Workbook.Worksheets.Add("Calculations");

ws.Cells["A1"].Value = 100;
ws.Cells["A2"].Value = 200;
ws.Cells["A3"].Value = 300;
ws.Cells["A4"].Formula = "SUM(A1:A3)";
ws.Cells["A5"].Formula = "AVERAGE(A1:A3)";

// Calculate formulas in memory
ws.Calculate();

Console.WriteLine($"Sum:     {ws.Cells["A4"].Value}");   // 600
Console.WriteLine($"Average: {ws.Cells["A5"].Value}");   // 200

package.SaveAs(new FileInfo("Calculations.xlsx"));

Protect a Worksheet and Workbook

using OfficeOpenXml;

using var package = new ExcelPackage();
var ws = package.Workbook.Worksheets.Add("Protected");

ws.Cells["A1"].Value = "This sheet is protected";

// Protect the worksheet (uses SHA-512 hashing)
ws.Protection.SetPassword("sheetPass");
ws.Protection.AllowSelectLockedCells = true;
ws.Protection.AllowSelectUnlockedCells = true;

// Protect the workbook structure
package.Workbook.Protection.SetPassword("workbookPass");
package.Workbook.Protection.LockStructure = true;

package.SaveAs(new FileInfo("Protected.xlsx"));

Save with Encryption

using OfficeOpenXml;

using var package = new ExcelPackage();
var ws = package.Workbook.Worksheets.Add("Encrypted");
ws.Cells["A1"].Value = "Sensitive data";

// Save with a file-open password (AES encryption)
package.SaveAs(new FileInfo("Encrypted.xlsx"), "openPassword");

Note that significant additional sample code is available in the FreePPlus.OfficeOpenXml.Tests project; and in FreePPlus.OfficeOpenXml.SampleApp.

License

The project is licensed under the GNU Lesser General Public License (LGPL) version 3. see: https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License

All code from EPPlus version 4.5.3.3 was licensed under the GNU Lesser General Public License (LGPL) version 3 - as of Jan 30, 2020. This project (FreePPlus) complies with all provisions of the open source license of EPPlus version 4.5.3.3 (code) - including making all modified, adapted and derived code freely available as open source, under the same license as the EPPlus code license.

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

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.0.100 91 4/12/2026
1.0.73 142 3/14/2026
1.0.72 116 3/14/2026
1.0.71 110 3/13/2026
1.0.49 128 2/27/2026
1.0.48 96 2/27/2026
0.0.2 3,953 6/10/2024
0.0.1 213 5/28/2024