Wsu.Asis.AutoDisplay.EPPlus 1.0.0.2

dotnet add package Wsu.Asis.AutoDisplay.EPPlus --version 1.0.0.2
                    
NuGet\Install-Package Wsu.Asis.AutoDisplay.EPPlus -Version 1.0.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="Wsu.Asis.AutoDisplay.EPPlus" Version="1.0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wsu.Asis.AutoDisplay.EPPlus" Version="1.0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Wsu.Asis.AutoDisplay.EPPlus" />
                    
Project file
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 Wsu.Asis.AutoDisplay.EPPlus --version 1.0.0.2
                    
#r "nuget: Wsu.Asis.AutoDisplay.EPPlus, 1.0.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 Wsu.Asis.AutoDisplay.EPPlus@1.0.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=Wsu.Asis.AutoDisplay.EPPlus&version=1.0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Wsu.Asis.AutoDisplay.EPPlus&version=1.0.0.2
                    
Install as a Cake Tool

AutoDisplay.EPPlus

This builds on the EP Plus Excel library to enable automatically filling Excel spreadsheets from an IEnumerable or a DataTable. This will use the formatting attributes in AutoFormatter.Core whenever they can be applied to Excel cells.

There are two core functions: FillColumnHeaders and FillData. There are other convenience functions that combine these together:

  • FillDataWithColumnHeaders adds both the column headers and data
  • FillReport adds a title to the first row

These functions are all extension methods to make chaining easier. All of these functions take a cell address for where to begin filling data at. Note that these coordinates are one indexed.

Examples:

worksheet.FillReport(myData);
worksheet.FillData(myData, "B6");

// Or using a coordinate system
worksheet.FillData(myData, 2, 6);

Formatting Output

How the value and property names are displayed can be controlled with attributes.

  • By default, the name of the property will be used as the display name. This can be changed with a DisplayAttribute:

    [Display(Name = "Thing ID")]
    public int ThingId { get; set; }
    
  • Enums use the name by default, but the display value can also be set using a DisplayAttribute:

    public enum MyOptions
    {
      [Display(Name = "Option 1")]
      Option1,
      [Display(Name = "Option 2")]
      Option2,
      [Display(Name = "Option 3")]
      Option3
    }
    
  • A DataFormatAttribute can be used to specify formatting for the property. This get used with string.Format.

    [DisplayFormat(DataFormatString = "{0:yyyyMMdd}")]
    public DateTime Created { get; set; }
    
  • A DataFormatAttribute can also be used to specify what to display when the value is null:

    [DisplayFormat(NullDisplayText = "None")]
    public int? Size { get; set; }
    
  • A DataTypeAttribute can also be used to change the format:

    [DataType(DataType.Currency)]
    public decimal Amount { get; set; }
    [DataType(DataType.EmailAddress)]
    public string? EmailAddress { get; set; }
    
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.2 328 2/8/2025
1.0.0.1 266 8/14/2024
1.0.0 201 8/8/2024