OpenExcelLite.Net48
1.0.0
dotnet add package OpenExcelLite.Net48 --version 1.0.0
NuGet\Install-Package OpenExcelLite.Net48 -Version 1.0.0
<PackageReference Include="OpenExcelLite.Net48" Version="1.0.0" />
<PackageVersion Include="OpenExcelLite.Net48" Version="1.0.0" />
<PackageReference Include="OpenExcelLite.Net48" />
paket add OpenExcelLite.Net48 --version 1.0.0
#r "nuget: OpenExcelLite.Net48, 1.0.0"
#:package OpenExcelLite.Net48@1.0.0
#addin nuget:?package=OpenExcelLite.Net48&version=1.0.0
#tool nuget:?package=OpenExcelLite.Net48&version=1.0.0
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");
โ Hyperlink Example
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 is compatible. |
-
.NETFramework 4.8
- DocumentFormat.OpenXml (>= 3.3.0)
-
.NETFramework 4.8.1
- DocumentFormat.OpenXml (>= 3.3.0)
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 |