All Projects → eraydin → EPPlus.Core.Extensions

eraydin / EPPlus.Core.Extensions

Licence: MIT license
An extensions library for EPPlus package to generate and manipulate Excel files easily.

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to EPPlus.Core.Extensions

PCLExt.FileStorage
Portable Storage APIs
Stars: ✭ 35 (-46.97%)
Mutual labels:  netstandard, netframework
EPPlus.Sample.NetFramework
EPPlus samples for .NET Framework. More details in Readme.md.
Stars: ✭ 31 (-53.03%)
Mutual labels:  epplus, netframework
dotnet
.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Stars: ✭ 865 (+1210.61%)
Mutual labels:  netstandard, netframework
MyDAL
The fastest and best ORM lite on C# for MySQL ! -- 友好, 轻量, 极致性能, 无任何第三方依赖, 持续演进~~
Stars: ✭ 32 (-51.52%)
Mutual labels:  netstandard, netframework
Epplus
EPPlus 5-Excel spreadsheets for .NET
Stars: ✭ 693 (+950%)
Mutual labels:  excel, netstandard
InTouch
👥 InTouch - is a programming SDK build around vk.com API exposing most of the social platform features including messaging, news feed fetching, communities, and media management.
Stars: ✭ 33 (-50%)
Mutual labels:  netstandard, netframework
Coding-Standards
Coding Guidelines for C#
Stars: ✭ 125 (+89.39%)
Mutual labels:  netstandard, netframework
profiler-api
The portable version of JetBrains profiler API for .NET Framework / .NET Core / .NET / .NET Standard / Mono
Stars: ✭ 21 (-68.18%)
Mutual labels:  netstandard, netframework
EPPlus4PHP
an easy-to-use excel library for php project which is compiled with peachpie. NOT FOR THE COMMON PHP PROJECT!
Stars: ✭ 15 (-77.27%)
Mutual labels:  excel, netstandard
EPPlus.DataExtractor
EPPlus extension that make easier to extract POCO from excel tables
Stars: ✭ 65 (-1.52%)
Mutual labels:  excel, epplus
Dexiom.EPPlusExporter
A very simple, yet incredibly powerfull library to generate Excel documents out of objects, arrays, lists, collections, etc.
Stars: ✭ 19 (-71.21%)
Mutual labels:  excel, epplus
Phpspreadsheet
A pure PHP library for reading and writing spreadsheet files
Stars: ✭ 10,627 (+16001.52%)
Mutual labels:  excel, msexcel
Bookfx
Composing Excel spreadsheets based on a tree of nested components like the HTML DOM.
Stars: ✭ 102 (+54.55%)
Mutual labels:  excel, netstandard
Weihanli.common
common tools,methods,extension methods etc... .net 常用工具类,公共方法,常用扩展方法等,基础类库
Stars: ✭ 152 (+130.3%)
Mutual labels:  extensions, netstandard
Vortice.Mathematics
Cross platform .NET math library.
Stars: ✭ 46 (-30.3%)
Mutual labels:  netstandard
react-datasheet-grid
An Airtable-like / Excel-like component to create beautiful spreadsheets.
Stars: ✭ 227 (+243.94%)
Mutual labels:  excel
D365FONinjaDevTools
To make of you a Ninja Developer in Dynamics 365 For Finance and Operations
Stars: ✭ 70 (+6.06%)
Mutual labels:  extensions
Qliksense Extension Tutorial
A comprehensive tutorial how to create Qlik Sense Visualization Extensions.
Stars: ✭ 244 (+269.7%)
Mutual labels:  extensions
Excel-Timesheet
⏰ This Add-In is used to produce a timesheet file with functionality to import your Google Timeline. The standard timesheet has options for start and end dates, day of week and default start, end and break times. The Google timeline options are start and end dates, UTC selection, daylight savings time parameters and title filter for timeline ent…
Stars: ✭ 25 (-62.12%)
Mutual labels:  excel
wxAutoExcel
wxAutoExcel is a wxWidgets library attempting to make Microsoft Excel automation with C++ a bit less painful.
Stars: ✭ 27 (-59.09%)
Mutual labels:  excel

EPPlus.Core.Extensions Build status codecov

Installation NuGet version

It's as easy as PM> Install-Package EPPlus.Core.Extensions from nuget

Dependencies

.NET Framework 4.6.1       EPPlus >= 4.5.3.3       System.ComponentModel.Annotations >= 4.7.0

.NET Standard 2.0       EPPlus >= 4.5.3.3       System.ComponentModel.Annotations >= 4.7.0

Documentation and Examples

The project will be documented soon but you can look at the test project for now. I hope it has enough number of examples to give you better idea about how to use these extension methods.

  • Converts IEnumerable into an Excel worksheet/package
  • Reads data from Excel packages and convert them into a List.
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));
    
    }  
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].