EPPlus.Core.Extensions
2.4.0
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.6.1
This package targets .NET Framework 4.6.1. The package is compatible with this framework or higher.
Suggested Alternatives
dotnet add package EPPlus.Core.Extensions --version 2.4.0
NuGet\Install-Package EPPlus.Core.Extensions -Version 2.4.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="EPPlus.Core.Extensions" Version="2.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EPPlus.Core.Extensions --version 2.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EPPlus.Core.Extensions, 2.4.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.
// Install EPPlus.Core.Extensions as a Cake Addin #addin nuget:?package=EPPlus.Core.Extensions&version=2.4.0 // Install EPPlus.Core.Extensions as a Cake Tool #tool nuget:?package=EPPlus.Core.Extensions&version=2.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
- Converts IEnumerable<T> into an Excel worksheet/package
- Reads data from Excel packages and convert 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 | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.1
- EPPlus (>= 4.5.3.2)
- System.ComponentModel.Annotations (>= 4.7.0)
-
.NETStandard 2.0
- EPPlus (>= 4.5.3.2)
- System.ComponentModel.Annotations (>= 4.7.0)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on EPPlus.Core.Extensions:
Package | Downloads |
---|---|
Tradeber.AbpCore.ServiceFabric
tradeber 基础设施库 |
|
IvyBaby.Infrastructure
暂无 |
|
Alizhou.Office
根据模板导入导出word,execl |
|
Farben.Office
Package Description |
|
FileReaders
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 | |
---|---|---|---|
2.4.0 | 796,881 | 1/5/2020 | |
2.3.2 | 92,120 | 4/8/2019 | |
2.3.1 | 24,456 | 3/19/2019 | |
2.3.0 | 7,766 | 3/7/2019 | |
2.2.4 | 41,597 | 8/9/2018 | |
2.2.3 | 4,391 | 6/27/2018 | |
2.2.2 | 1,642 | 6/26/2018 | |
2.2.1 | 5,287 | 6/5/2018 | |
2.2.0 | 1,789 | 6/2/2018 | |
2.1.0 | 6,142 | 5/26/2018 | |
2.0.0 | 3,754 | 5/16/2018 | |
2.0.0-preview1 | 1,390 | 5/15/2018 | |
1.2.8 | 2,672 | 4/13/2018 | |
1.2.7 | 31,130 | 2/26/2018 | |
1.2.6 | 4,033 | 2/11/2018 | |
1.2.5 | 2,102 | 2/9/2018 | |
1.2.4 | 4,420 | 11/27/2017 | |
1.2.3 | 2,177 | 11/8/2017 | |
1.2.2 | 1,693 | 11/7/2017 | |
1.2.1 | 1,564 | 11/6/2017 | |
1.2.0 | 2,319 | 10/14/2017 | |
1.1.9 | 1,856 | 10/3/2017 | |
1.1.8 | 1,693 | 9/27/2017 | |
1.1.7 | 1,513 | 9/27/2017 | |
1.1.6 | 1,450 | 9/27/2017 | |
1.1.5 | 1,644 | 9/21/2017 | |
1.1.4 | 1,477 | 9/18/2017 | |
1.1.3 | 1,491 | 9/16/2017 | |
1.1.2 | 1,887 | 8/25/2017 | |
1.1.1 | 1,473 | 8/25/2017 | |
1.1.0 | 1,528 | 8/24/2017 | |
1.0.2 | 1,516 | 8/24/2017 | |
1.0.1 | 1,519 | 8/22/2017 | |
1.0.0 | 1,635 | 8/21/2017 | |
1.0.0-preview2 | 2,430 | 8/20/2017 | |
1.0.0-preview1 | 2,110 | 8/19/2017 |