Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 1.12 KB

README.md

File metadata and controls

29 lines (26 loc) · 1.12 KB

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