Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Project structure
This project allows to generat Excel reports using multiple Excel writter libraries (EPPlus and ClosedXML)
Kevull.MultiHeader.Core contains the interfaces and code agnostic to the excel writter library.
There is a parallel structure under tests folder for unit tests.

# Additional instructions
- when moving files use git mv <source> <destination> to trakc changes in git history
- in public and protected methods and properties, use the <inheritdoc /> tag if the class is inheriteing from a parent; otherwise write the xml documenation
- write code and aswer in English, even if the question is in another language
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ on:

env:
NUGET_FOLDER: ${{ github.workspace}}/nuget
DOTNET_VERSION: 8.0.X
DOTNET_VERSION: 10.0.X
CONFIGURATION: Release

jobs:
build:
runs-on: ubuntu-latest
env:
SOLUTION_ROOT: src/Kevull.EPPLus.MultiHeader.sln
SOLUTION_ROOT: Kevull.MultiHeader.slnx

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 11 additions & 0 deletions Kevull.MultiHeader.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Solution>
<Folder Name="/Tests/">
<Project Path="tests/Kevull.MultiHeader.ClosedXml.Tests/Kevull.MultiHeader.ClosedXml.Tests.csproj" />
<Project Path="tests/Kevull.MultiHeader.Core.Tests/Kevull.MultiHeader.Core.Tests.csproj" />
<Project Path="tests/Kevull.MultiHeader.EPPLus.Tests/Kevull.MultiHeader.EPPLus.Tests.csproj" />
<Project Path="tests/Kevull.MultiHeader.TestCommon/Kevull.MultiHeader.TestCommon.csproj" />
</Folder>
<Project Path="src/Kevull.MultiHeader.ClosedXml/Kevull.MultiHeader.ClosedXml.csproj" />
<Project Path="src/Kevull.MultiHeader.Core/Kevull.MultiHeader.Core.csproj" />
<Project Path="src/Kevull.MultiHeader.EPPLus/Kevull.MultiHeader.EPPLus.csproj" />
</Solution>
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[![build library](https://github.com/mnieto/Kevull.EPPLus.MultiHeader/actions/workflows/build.yml/badge.svg)](https://github.com/mnieto/Kevull.EPPLus.MultiHeader/actions/workflows/build.yml)

# Kevull.EPPLus.MultiHeader
Extension for the [EPPlus](https://github.com/EPPlusSoftware/EPPlus) library to create reports from complex objects
Extension to create Excel reports from complex objects with two implementation flavours:
- [EPPlus](https://github.com/EPPlusSoftware/EPPlus)
- [ClosedXML](https://github.com/ClosedXML/ClosedXML)

Given a list like this:
```csharp
Expand Down Expand Up @@ -35,14 +37,22 @@ Given a list like this:
};
```

this code:
With EPPlus:
```csharp
using var xls = new ExcelPackage();
var report = new MultiHeaderReport<RootLevel>(xls, "Object");
report.GenerateReport(complexObject);
xls.SaveAs("Report.xlsx");
```

Equivalent code with ClosedXML:
```csharp
using var xls = new XLWorkbook();
var report = new MultiHeaderReport<RootLevel>(xls, "Object");
report.GenerateReport(complexObject);
report.Save("Report.xlsx");
```

will render like this:

![image](.github/example.png)
Expand Down Expand Up @@ -184,4 +194,5 @@ Default top-left cell is A1. With `SetStartingAddress` you can specify any other
- Append rows to an existing report ✓
- Posibility to change the top-left starting point ✓
- Target netstandard 2.0 in nuget package ✓
- Frozen rows and columns ✓
- Dual implementation with EPPlus and ClosedXML ✓
- Frozen rows and columns ✓
2 changes: 0 additions & 2 deletions src/Kevull.EPPLus.MultiHeader.Test/Usings.cs

This file was deleted.

31 changes: 0 additions & 31 deletions src/Kevull.EPPLus.MultiHeader.sln

This file was deleted.

Loading
Loading