Skip to content

Generic excel exporter for collection of any strong typed objects.

Notifications You must be signed in to change notification settings

zsu/GenericExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuGet License: MIT

What is GenericExporter

GenericExporter is a generic excel exporter for collection of any strong typed objects. GenericExporter uses reflecton to get property name as header in the output file. But you can also provide optional parameters for custom headers and even formatters.

NuGet

Install-Package GenericExporter

Getting started with GenericExporter

  • Add dependency injection in Startup:
   services.AddGenericExporter();
  • Call export function:
  var items=new List<User>(new User{...});
  var result = _exporter.Export(items);
  • Otional parameters for custom headers and formatters:
  var items=new List<User>(new User{...});
  var result = _exporter.Export(items,new[] {"Id","Full Name","Birthday"},x=>new[] {x.Id,x.Name,x.Birthday.ToShortDateString()});

License

All source code is licensed under MIT license - http://www.opensource.org/licenses/mit-license.php

About

Generic excel exporter for collection of any strong typed objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages