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
<PackageReference Include="Wsu.Asis.AutoDisplay.EPPlus" Version="1.0.0.2" />
<PackageVersion Include="Wsu.Asis.AutoDisplay.EPPlus" Version="1.0.0.2" />
<PackageReference Include="Wsu.Asis.AutoDisplay.EPPlus" />
paket add Wsu.Asis.AutoDisplay.EPPlus --version 1.0.0.2
#r "nuget: Wsu.Asis.AutoDisplay.EPPlus, 1.0.0.2"
#:package Wsu.Asis.AutoDisplay.EPPlus@1.0.0.2
#addin nuget:?package=Wsu.Asis.AutoDisplay.EPPlus&version=1.0.0.2
#tool nuget:?package=Wsu.Asis.AutoDisplay.EPPlus&version=1.0.0.2
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:
FillDataWithColumnHeadersadds both the column headers and dataFillReportadds 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
DataFormatAttributecan be used to specify formatting for the property. This get used withstring.Format.[DisplayFormat(DataFormatString = "{0:yyyyMMdd}")] public DateTime Created { get; set; }A
DataFormatAttributecan also be used to specify what to display when the value is null:[DisplayFormat(NullDisplayText = "None")] public int? Size { get; set; }A
DataTypeAttributecan also be used to change the format:[DataType(DataType.Currency)] public decimal Amount { get; set; } [DataType(DataType.EmailAddress)] public string? EmailAddress { get; set; }
| Product | Versions 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. |
-
net8.0
- EPPlus (>= 7.6.0)
- Wsu.Asis.AutoDisplay.Core (>= 1.0.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.