OpenExcelLite.Net48 1.0.0

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

OpenExcelLite.Net48

A lightweight, schema-safe Excel (XLSX) generator for .NET Framework 4.8 / 4.8.1
built on the official OpenXML 3.3.0 SDK โ€” with no Excel interop, no COM, and zero dependencies.

This library mirrors the simplicity and API design philosophy of OpenExcelLite (modern .NET)
while remaining fully compatible with legacy .NET Framework applications.


โœจ Features

  • Create Excel files entirely in memory or save to file
  • Multi-sheet workbook support
  • Schema-safe rows (column count validated)
  • AddRow(), AddRows(), AddEmptyRows()
  • HyperlinkCell for clickable links
  • Auto column width calculation
  • Header styling (bold + background)
  • Freeze panes (top rows / left columns)
  • Date handling using OADate numeric format
  • Works on .NET Framework 4.8 / 4.8.1
  • Zero external dependencies (other than OpenXML SDK)

๐Ÿ“ฆ Installation

Project Reference

<ItemGroup>
  <ProjectReference Include="OpenExcelLite.Net48.csproj" />
</ItemGroup>


```xml
<ItemGroup>
  <ProjectReference Include="OpenExcelLite.Net48.csproj" />
</ItemGroup>

Or use NuGet (if published):

Install-Package OpenExcelLite.Net48

๐Ÿš€ Usage

โœ” Simple Example

var workbook = new ExcelWorkbook();
var sheet = workbook.AddSheet("Users");

sheet.AddRow("Id", "Name", "Email");
sheet.AddRow(1, "Alex", "alex@test.com");
sheet.AddRow(2, "Bella", "bella@test.com");

workbook.SaveToFile("users.xlsx");

var wb = new ExcelWorkbook();
var sheet = wb.AddSheet("Links");

sheet.AddRow("Title", "URL");
sheet.AddRow("OpenAI", new HyperlinkCell("Visit", "https://openai.com"));

wb.SaveToFile("links.xlsx");

โœ” Multi-Sheet Example

var wb = new ExcelWorkbook();

var products = wb.AddSheet("Products");
products.AddRow("Id", "Name", "Price");
products.AddRow(1, "Keyboard", 129.90m);

var orders = wb.AddSheet("Orders");
orders.AddRow("OrderId", "Total");
orders.AddRow(1001, 199.80m);

wb.SaveToFile("multi_sheet.xlsx");

โœ” In-Memory Array Example

var wb = new ExcelWorkbook();
wb.AddSheet("Data").AddRow("A", "B", "C");

byte[] bytes = wb.ToArray();
File.WriteAllBytes("array.xlsx", bytes);

๐Ÿ“ Samples

See the samples/OpenExcelLite.Net48.Sample folder for complete demo cases:

  • In-memory examples
  • Hyperlinks
  • Empty rows (before or after header)
  • Multi-sheet
  • Multi-sheet hyperlinks
  • 10-sheet generation

๐Ÿงช Unit Tests

The tests/OpenExcelLite.Net48.Tests project includes coverage for:

  • Multi-sheet workbooks
  • Hyperlink relationships
  • Auto column widths
  • Date cells (OADate)
  • Freeze panes correctness

๐Ÿ”ง Compatibility

Feature Supported
.NET Framework 4.8 / 4.8.1 โœ”
C# 7.3 โœ”
OpenXML 3.3.0 โœ”
Streaming APIs (Span/ArrayPool) โœ– Not supported on .NET48
Async APIs โœ–

๐Ÿ“„ License

This project is released under the MIT License.

See: LICENSE

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 is compatible. 
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.0 126 11/29/2025