Woof.NPOI
6.2.1
Prefix Reserved
See the version list below for details.
dotnet add package Woof.NPOI --version 6.2.1
NuGet\Install-Package Woof.NPOI -Version 6.2.1
<PackageReference Include="Woof.NPOI" Version="6.2.1" />
paket add Woof.NPOI --version 6.2.1
#r "nuget: Woof.NPOI, 6.2.1"
// Install Woof.NPOI as a Cake Addin #addin nuget:?package=Woof.NPOI&version=6.2.1 // Install Woof.NPOI as a Cake Tool #tool nuget:?package=Woof.NPOI&version=6.2.1
Woof.NPOI
A part of the Woof Tookit by CodeDog.
Distributed under MIT License. (c)2022 by CodeDog, All rights reserved.
About
The easiest multi-platform "export to Excel" feature.
Uses Apache NPOI to create an Excel workbook. This library allows any collection to be exported to Excel in one simple method.
Built in sane defaults and automatics allow creating decent looking, clean and readable spreasheets out of raw data without any tweaking done.
Column widths are automatic by default, can be defined manually in data adnotations. Data formats are automatic too, but can be defined in the same way.
No need for creating specialized objects, manually creating rows or columns.
It works full auto. Just data.ToExcel("myFileName.xlsx");
, done and done.
You want to download Excel files in a web application?
No problem, it has XWorkbookResut
type exactly for that purpose.
User's browser will know it's an Excel file and will open it in Excel,
LibreOffice or any other compatible app.
Woof.NPOI is to NPOI like HTML2PDF are to just plain PDF generators. A PDF generator is a DRAWING API, you can't just convert some formatted text to a document. You must draw each text block and graphical element.
NPOI library is an Excel file generator. You have to format and place each cell. Woof.NPOI is a converter. It takes any collection of objects and treats each object as a row. Its properties are values for the subsequent columns.
Woof.NPOI also does some formatting. It makes the first row the headers row. Without additional hints it will use the property names for headers. But of course using annotations you can define any custom names for the columns.
The header row is frozen, so you can scroll the sheet and the header row stays in place.
Automatic summary is provided. You can sum one or more columns, show summary at the bottom or at the top.
Please see the provided example test project to see how it's done and use built in XML documentation.
As always, report any bugs found as GitHub issues.
Works and tested both on Windows and Linux. Produced files were tested both on Microsoft Excel and LibreOffice Calc.
Usage
Add
using
directive:using Woof.NPOI;
[Optional] Create export type by setting
XSheet
andXCell
attributes.Convert directly to Excel file with
ToExcel()
extension method, convert toXSSFWorkbook
withToXSSFWorkbook()
extension method or return newXWorkbookResult
created from collection in your web application controller.
See the attached Woof.NPOI.Test
project for a simple example.
Disclaimer
Woof Toolkit is a work in progress in constant development, however it's carefully maintained with production code quality.
PLEASE report all issues on GitHub!
Describe how to reproduce an issue. Also feel free to suggest new features or improvements.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- NPOI (>= 2.5.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
ADD: AutoFilters.