EPPlus.Core.Extensions
3.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package EPPlus.Core.Extensions --version 3.0.2
NuGet\Install-Package EPPlus.Core.Extensions -Version 3.0.2
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="EPPlus.Core.Extensions" Version="3.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EPPlus.Core.Extensions" Version="3.0.2" />
<PackageReference Include="EPPlus.Core.Extensions" />
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 EPPlus.Core.Extensions --version 3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EPPlus.Core.Extensions, 3.0.2"
#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 EPPlus.Core.Extensions@3.0.2
#: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=EPPlus.Core.Extensions&version=3.0.2
#tool nuget:?package=EPPlus.Core.Extensions&version=3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EPPlus.Core.Extensions 
Installation 
It's as easy as PM> Install-Package EPPlus.Core.Extensions from nuget
Dependencies
.NET 10.0 EPPlus >= 8.5.3
Documentation and Examples
The project will be documented soon but you can look at the test project for now. I hope it has enough examples to give you a better idea of how to use these extension methods.
- Converts IEnumerable<T> into an Excel worksheet/package
- Reads data from Excel packages and converts them into a List<T>.
Basic examples:
public class PersonDto
{
[ExcelTableColumn("First name")]
[Required(ErrorMessage = "First name cannot be empty.")]
[MaxLength(50, ErrorMessage = "First name cannot be more than {1} characters.")]
public string FirstName { get; set; }
[ExcelTableColumn(columnName = "Last name", isOptional = true)]
public string LastName { get; set; }
[ExcelTableColumn(3)]
[Range(1900, 2050, ErrorMessage = "Please enter a value bigger than {1}")]
public int YearBorn { get; set; }
public decimal NotMapped { get; set; }
[ExcelTableColumn(isOptional = true)]
public decimal OptionalColumn1 { get; set; }
[ExcelTableColumn(columnIndex=999, isOptional = true)]
public decimal OptionalColumn2 { get; set; }
}
- Converting from Excel to list of objects
// Direct usage:
excelPackage.ToList<PersonDto>(configuration => configuration.SkipCastingErrors());
// Specific worksheet:
excelPackage.GetWorksheet("Persons").ToList<PersonDto>();
- From a list of objects to Excel package
List<PersonDto> persons = new List<PersonDto>();
// Convert list into ExcelPackage
ExcelPackage excelPackage = persons.ToExcelPackage();
// Convert list into byte array
byte[] excelPackageXlsx = persons.ToXlsx();
// Generate ExcelPackage with configuration
List<PersonDto> pre50 = persons.Where(x => x.YearBorn < 1950).ToList();
List<PersonDto> post50 = persons.Where(x => x.YearBorn >= 1950).ToList();
ExcelPackage excelPackage = pre50.ToWorksheet("< 1950")
.WithConfiguration(configuration => configuration.WithColumnConfiguration(x => x.AutoFit()))
.WithColumn(x => x.FirstName, "First Name")
.WithColumn(x => x.LastName, "Last Name")
.WithColumn(x => x.YearBorn, "Year of Birth")
.WithTitle("< 1950")
.NextWorksheet(post50, "> 1950")
.WithColumn(x => x.LastName, "Last Name")
.WithColumn(x => x.YearBorn, "Year of Birth")
.WithTitle("> 1950")
.ToExcelPackage();
- Generating an Excel template from ExcelWorksheetAttribute marked classes
[ExcelWorksheet("Stocks")]
public class StocksDto
{
[ExcelTableColumn("SKU")]
public string Barcode { get; set; }
[ExcelTableColumn]
public int Quantity { get; set; }
}
// To ExcelPackage
ExcelPackage excelPackage = Assembly.GetExecutingAssembly().GenerateExcelPackage(nameof(StocksDto));
// To ExcelWorksheet
using(var excelPackage = new ExcelPackage()){
ExcelWorksheet worksheet = excelPackage.GenerateWorksheet(Assembly.GetExecutingAssembly(), nameof(StocksDto));
}
| Product | Versions 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.
-
net10.0
- EPPlus (>= 8.5.3)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on EPPlus.Core.Extensions:
| Package | Downloads |
|---|---|
|
Tradeber.AbpCore.ServiceFabric
tradeber 基础设施库 |
|
|
IvyBaby.Infrastructure
暂无 |
|
|
Alizhou.Office
根据模板导入导出word,execl |
|
|
FileReaders
Package Description |
|
|
Farben.Office
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on EPPlus.Core.Extensions:
| Repository | Stars |
|---|---|
|
WeihanLi/WeihanLi.Npoi
NPOI Extensions, excel/csv importer/exporter for IEnumerable<T>/DataTable, fluentapi(great flexibility)/attribute configuration
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.1.0 | 0 | 4/18/2026 | |
| 3.0.4 | 0 | 4/18/2026 | |
| 3.0.3 | 0 | 4/18/2026 | |
| 3.0.2 | 0 | 4/18/2026 | |
| 3.0.1 | 0 | 4/18/2026 | |
| 3.0.0 | 0 | 4/18/2026 | |
| 2.4.0 | 1,012,599 | 1/5/2020 | |
| 2.3.2 | 95,290 | 4/8/2019 | |
| 2.3.1 | 25,218 | 3/19/2019 | |
| 2.3.0 | 8,076 | 3/7/2019 | |
| 2.2.4 | 43,266 | 8/9/2018 | |
| 2.2.3 | 5,094 | 6/27/2018 | |
| 2.2.2 | 2,282 | 6/26/2018 | |
| 2.2.1 | 6,063 | 6/5/2018 | |
| 2.2.0 | 2,445 | 6/2/2018 | |
| 2.1.0 | 6,813 | 5/26/2018 | |
| 2.0.0 | 4,852 | 5/16/2018 | |
| 2.0.0-preview1 | 1,951 | 5/15/2018 | |
| 1.2.8 | 3,306 | 4/13/2018 | |
| 1.2.7 | 37,482 | 2/26/2018 |
Loading failed