Woof.NPOI 6.2.1

Prefix Reserved
There is a newer version of this package available.
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                
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="Woof.NPOI" Version="6.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Woof.NPOI --version 6.2.1                
#r "nuget: Woof.NPOI, 6.2.1"                
#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.
// 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

  1. Add using directive:

    using Woof.NPOI;
    
  2. [Optional] Create export type by setting XSheet and XCell attributes.

  3. Convert directly to Excel file with ToExcel() extension method, convert to XSSFWorkbook with ToXSSFWorkbook() extension method or return new XWorkbookResult 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 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. 
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
7.0.1 190 10/30/2023
7.0.0 178 8/6/2023
6.2.1 418 3/15/2022
6.2.0 422 2/20/2022
5.0.1 323 9/23/2021
5.0.0 328 9/20/2021

ADD: AutoFilters.