Jxls.Npoi 3.0.1

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

Jxls.Net

NuGet NuGet Core CI License

Jxls.Net is a C# / .NET port of JXLS 3.x for declarative Excel template-based report generation. Design your report layout, styles, charts, and formulas directly in Excel (.xlsx or .xls), annotate cells with jx:* comments, and fill them with .NET objects or dictionaries — no brittle cell-by-cell imperative code.

AI / LLM Agents: See llms.txt for a concise, single-file API and template syntax reference.


Features

  • 100% Declarative Excel Templates: jx:area, jx:each (select, orderBy, groupBy, direction="RIGHT", multisheet), jx:if (ifArea / elseArea), jx:grid, jx:updateCell, jx:mergeCells, jx:areaColumnMerge, jx:autoRowHeight, jx:image.
  • Automatic Excel Formula Expansion: SUM(B3) automatically rewrites to SUM(B3:B102) after dynamic row/column expansion (StandardFormulaProcessor & FastFormulaProcessor).
  • Full .xlsx, .xls, and SXSSF Streaming Support: Powered by NPOI 2.8.1 (Apache-2.0).
  • Sandboxed Expression Engine: Powered by DynamicExpresso.Core (MIT) — supports POCOs, IDictionary<string, object?>, ExpandoObject, nested properties, arithmetic/ternary, and case-insensitive lookup (existing Java JXLS templates like ${emp.name} work directly with C# Employee.Name).
  • Multi-Target: netstandard2.0 + net8.0 (compatible with .NET Framework 4.8+ and .NET 6/8/9/10).

Installation

dotnet add package Jxls.Npoi

(Installing Jxls.Npoi automatically includes Jxls.Core.)


10-Line Quickstart

  1. In template.xlsx:
    • Cell A1 comment: jx:area(lastCell="D4")
    • Cell A3 comment: jx:each(items="employees" var="emp" lastCell="D3")
    • Row 3 cells: ${emp.Name}, ${emp.Payment}, ${emp.Bonus}, ${emp.Payment + emp.Bonus}
    • Row 4 cells: Total, =SUM(B3), =SUM(C3), =SUM(D3)
  2. Fill the template in C#:
using System.Collections.Generic;
using Jxls.Builder;
using Jxls.Transform.Npoi;

var data = new Dictionary<string, object?>
{
    ["employees"] = new[]
    {
        new { Name = "Alice", Payment = 3000m, Bonus = 450m },
        new { Name = "Bob",   Payment = 2500m, Bonus = 250m }
    }
};

JxlsNpoiTemplateFillerBuilder.NewInstance()
    .WithTemplate("template.xlsx")
    .BuildAndFill(data, new JxlsOutputFile("output.xlsx"));

Quick Grid Export (No Template File Needed)

using Jxls.Template;

var headers = new List<string> { "Name", "Payment", "Bonus" };
using var output = File.Create("export.xlsx");
SimpleExporter.GridExport(headers, employees, "Name,Payment,Bonus", output);

Supported Template Commands

Command Purpose Example
jx:area Defines root template area jx:area(lastCell="D4")
jx:each Iterates collections (rows, columns, multi-sheet, grouping, sorting, filtering) jx:each(items="emps" var="e" lastCell="D3" select="e.Active" orderBy="e.Name ASC")
jx:if Conditional rendering with optional else area jx:if(condition="e.Payment >= 2000" lastCell="C3" areas=["A3:C3","A4:C4"])
jx:grid Dynamic headers + rows grid jx:grid(headers="headers" data="rows" props="Name,Payment" lastCell="A2")
jx:mergeCells Dynamic cell merging jx:mergeCells(lastCell="C2" cols="3")
jx:image Embeds PNG/JPEG/EMF/WMF images from byte[] jx:image(src="logo" imageType="PNG" lastCell="B4")
jx:autoRowHeight Auto-adjusts row height jx:autoRowHeight(lastCell="D3")
jx:updateCell Custom cell transformation hook (ICellDataUpdater) jx:updateCell(updater="myUpdater" lastCell="B3")

Building & Testing

dotnet build Jxls.Net.sln --configuration Release
dotnet test Jxls.Net.sln --configuration Release

Attribution & License

Jxls.Net is a C# / .NET port derived from jxlsteam/jxls. Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
3.0.1 0 12/5/2026
3.0.0 0 12/4/2026