Skip to content

Commit 445686f

Browse files
committed
Add project files.
1 parent 5090b08 commit 445686f

25 files changed

+1809
-0
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changelog
2+
3+
All notable changes to **OpenExcelLite.Net48** will be documented in this file.
4+
5+
---
6+
7+
## [1.0.0] – 2025-02-01
8+
### Added
9+
- First stable release of **OpenExcelLite.Net48**
10+
- Multi-sheet workbook support
11+
- AddSheet(), AddRow(), AddRows(), AddEmptyRows()
12+
- HyperlinkCell support
13+
- Auto column width calculation
14+
- Header styling (bold + background)
15+
- Freeze panes (`FreezePanes(row, col)`)
16+
- Shared String Table implementation
17+
- Date and numeric cell handling (OADate support)
18+
- In-memory export using `ToArray()`
19+
- Save to file using `SaveToFile(path)`
20+
- Fully compatible with .NET Framework 4.8 / 4.8.1
21+
- xUnit test suite included
22+
- Full sample demo following OpenExcelLite 1.3.0 style
23+
24+
---

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 livedcode
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

OpenExcelLite.Net48.sln

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36705.20 d17.14
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5D20AA90-6969-D8BD-9DCD-8634F4692FDA}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenExcelLite.Net48.Sample", "samples\OpenExcelLite.Net48.Sample\OpenExcelLite.Net48.Sample.csproj", "{60550A00-3685-4986-9600-EB4A273C66F7}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{089100B1-113F-4E66-888A-E83F3999EAFD}"
11+
ProjectSection(SolutionItems) = preProject
12+
CHANGELOG.md = CHANGELOG.md
13+
LICENSE = LICENSE
14+
README.md = README.md
15+
EndProjectSection
16+
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
18+
EndProject
19+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenExcelLite.Net48", "src\OpenExcelLite.Net48\OpenExcelLite.Net48.csproj", "{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6}"
20+
EndProject
21+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
22+
EndProject
23+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenExcelLite.Net48.Tests", "tests\OpenExcelLite.Net48.Tests\OpenExcelLite.Net48.Tests.csproj", "{DC7EB016-900A-420A-8643-5F36BD3F3A80}"
24+
EndProject
25+
Global
26+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
27+
Debug|Any CPU = Debug|Any CPU
28+
Release|Any CPU = Release|Any CPU
29+
EndGlobalSection
30+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31+
{60550A00-3685-4986-9600-EB4A273C66F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{60550A00-3685-4986-9600-EB4A273C66F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{60550A00-3685-4986-9600-EB4A273C66F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{60550A00-3685-4986-9600-EB4A273C66F7}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{DC7EB016-900A-420A-8643-5F36BD3F3A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{DC7EB016-900A-420A-8643-5F36BD3F3A80}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{DC7EB016-900A-420A-8643-5F36BD3F3A80}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{DC7EB016-900A-420A-8643-5F36BD3F3A80}.Release|Any CPU.Build.0 = Release|Any CPU
43+
EndGlobalSection
44+
GlobalSection(SolutionProperties) = preSolution
45+
HideSolutionNode = FALSE
46+
EndGlobalSection
47+
GlobalSection(NestedProjects) = preSolution
48+
{60550A00-3685-4986-9600-EB4A273C66F7} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA}
49+
{CF296E4C-D2AB-4BD1-9CA3-DA306238E7A6} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
50+
{DC7EB016-900A-420A-8643-5F36BD3F3A80} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
51+
EndGlobalSection
52+
EndGlobal

OpenExcelLite.Net48.slnx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Solution>
2+
<Folder Name="/samples/">
3+
<Project Path="samples/OpenExcelLite.Net48.Sample/OpenExcelLite.Net48.Sample.csproj" Id="60550a00-3685-4986-9600-eb4a273c66f7" />
4+
</Folder>
5+
<Folder Name="/Solution Items/">
6+
<File Path="CHANGELOG.md" />
7+
<File Path="LICENSE" />
8+
<File Path="README.md" />
9+
</Folder>
10+
<Folder Name="/src/">
11+
<Project Path="src/OpenExcelLite.Net48/OpenExcelLite.Net48.csproj" Id="cf296e4c-d2ab-4bd1-9ca3-da306238e7a6" />
12+
</Folder>
13+
<Folder Name="/tests/">
14+
<Project Path="tests/OpenExcelLite.Net48.Tests/OpenExcelLite.Net48.Tests.csproj" Id="dc7eb016-900a-420a-8643-5f36bd3f3a80" />
15+
</Folder>
16+
</Solution>

README.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# OpenExcelLite.Net48
2+
3+
A lightweight, schema-safe Excel (XLSX) generator for **.NET Framework 4.8 / 4.8.1**
4+
built on the official **OpenXML 3.3.0** SDK — with **no Excel interop**, **no COM**, and **zero dependencies**.
5+
6+
This library mirrors the simplicity and API design philosophy of **OpenExcelLite (modern .NET)**
7+
while remaining fully compatible with legacy .NET Framework applications.
8+
9+
---
10+
11+
## ✨ Features
12+
13+
- Create Excel files entirely **in memory** or **save to file**
14+
- **Multi-sheet** workbook support
15+
- **Schema-safe** rows (column count validated)
16+
- **AddRow()**, **AddRows()**, **AddEmptyRows()**
17+
- **HyperlinkCell** for clickable links
18+
- **Auto column width** calculation
19+
- **Header styling** (bold + background)
20+
- **Freeze panes** (top rows / left columns)
21+
- **Date** handling using OADate numeric format
22+
- Works on **.NET Framework 4.8 / 4.8.1**
23+
- Zero external dependencies (other than OpenXML SDK)
24+
25+
---
26+
27+
## 📦 Installation
28+
29+
### Project Reference
30+
31+
```xml
32+
<ItemGroup>
33+
<ProjectReference Include="OpenExcelLite.Net48.csproj" />
34+
</ItemGroup>
35+
36+
37+
```xml
38+
<ItemGroup>
39+
<ProjectReference Include="OpenExcelLite.Net48.csproj" />
40+
</ItemGroup>
41+
```
42+
43+
Or use NuGet (if published):
44+
45+
```
46+
Install-Package OpenExcelLite.Net48
47+
```
48+
49+
---
50+
51+
## 🚀 Usage
52+
53+
### ✔ Simple Example
54+
55+
```csharp
56+
var workbook = new ExcelWorkbook();
57+
var sheet = workbook.AddSheet("Users");
58+
59+
sheet.AddRow("Id", "Name", "Email");
60+
sheet.AddRow(1, "Alex", "[email protected]");
61+
sheet.AddRow(2, "Bella", "[email protected]");
62+
63+
workbook.SaveToFile("users.xlsx");
64+
```
65+
66+
---
67+
68+
### ✔ Hyperlink Example
69+
70+
```csharp
71+
var wb = new ExcelWorkbook();
72+
var sheet = wb.AddSheet("Links");
73+
74+
sheet.AddRow("Title", "URL");
75+
sheet.AddRow("OpenAI", new HyperlinkCell("Visit", "https://openai.com"));
76+
77+
wb.SaveToFile("links.xlsx");
78+
```
79+
80+
---
81+
82+
### ✔ Multi-Sheet Example
83+
84+
```csharp
85+
var wb = new ExcelWorkbook();
86+
87+
var products = wb.AddSheet("Products");
88+
products.AddRow("Id", "Name", "Price");
89+
products.AddRow(1, "Keyboard", 129.90m);
90+
91+
var orders = wb.AddSheet("Orders");
92+
orders.AddRow("OrderId", "Total");
93+
orders.AddRow(1001, 199.80m);
94+
95+
wb.SaveToFile("multi_sheet.xlsx");
96+
```
97+
98+
---
99+
100+
### ✔ In-Memory Array Example
101+
102+
```csharp
103+
var wb = new ExcelWorkbook();
104+
wb.AddSheet("Data").AddRow("A", "B", "C");
105+
106+
byte[] bytes = wb.ToArray();
107+
File.WriteAllBytes("array.xlsx", bytes);
108+
```
109+
110+
---
111+
112+
## 📁 Samples
113+
114+
See the `samples/OpenExcelLite.Net48.Sample` folder for complete demo cases:
115+
116+
- In-memory examples
117+
- Hyperlinks
118+
- Empty rows (before or after header)
119+
- Multi-sheet
120+
- Multi-sheet hyperlinks
121+
- 10-sheet generation
122+
123+
---
124+
125+
## 🧪 Unit Tests
126+
127+
The `tests/OpenExcelLite.Net48.Tests` project includes coverage for:
128+
129+
- Multi-sheet workbooks
130+
- Hyperlink relationships
131+
- Auto column widths
132+
- Date cells (OADate)
133+
- Freeze panes correctness
134+
135+
---
136+
137+
## 🔧 Compatibility
138+
139+
| Feature | Supported |
140+
|--------|-----------|
141+
| .NET Framework 4.8 / 4.8.1 ||
142+
| C# 7.3 ||
143+
| OpenXML 3.3.0 ||
144+
| Streaming APIs (Span/ArrayPool) | ✖ Not supported on .NET48 |
145+
| Async APIs ||
146+
147+
---
148+
149+
## 📄 License
150+
151+
This project is released under the **MIT License**.
152+
153+
See: `LICENSE`
154+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5+
</startup>
6+
</configuration>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{60550A00-3685-4986-9600-EB4A273C66F7}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>OpenExcelLite.Net48.Sample</RootNamespace>
10+
<AssemblyName>OpenExcelLite.Net48.Sample</AssemblyName>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Data.DataSetExtensions" />
40+
<Reference Include="Microsoft.CSharp" />
41+
<Reference Include="System.Data" />
42+
<Reference Include="System.Net.Http" />
43+
<Reference Include="System.Xml" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="Program.cs" />
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="App.config" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<ProjectReference Include="..\..\src\OpenExcelLite.Net48\OpenExcelLite.Net48.csproj">
54+
<Project>{cf296e4c-d2ab-4bd1-9ca3-da306238e7a6}</Project>
55+
<Name>OpenExcelLite.Net48</Name>
56+
</ProjectReference>
57+
</ItemGroup>
58+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
59+
</Project>

0 commit comments

Comments
 (0)