Installation

dotnet-poi ships as multiple NuGet packages — pick the combination that fits your project.

Quick Pick

If you need…Install this
xlsx / docx / pptx read/write onlyDotnetPoi.Ooxml
OOXML + formula evaluatorDotnetPoi.Ooxml + DotnetPoi.Formula
xls / doc / ppt (legacy binary) onlyDotnetPoi.Legacy
All formats + formula (everything)DotnetPoi.All

Package Reference

OOXML-only project (xlsx, docx, pptx):

<ItemGroup>
  <PackageReference Include="DotnetPoi.Ooxml" Version="..." />
</ItemGroup>

Add formula evaluation when needed:

<ItemGroup>
  <PackageReference Include="DotnetPoi.Ooxml" Version="..." />
  <PackageReference Include="DotnetPoi.Formula" Version="..." />
</ItemGroup>

Legacy binary formats (xls, doc, ppt):

<ItemGroup>
  <PackageReference Include="DotnetPoi.Legacy" Version="..." />
</ItemGroup>

Everything in one dependency:

<ItemGroup>
  <PackageReference Include="DotnetPoi.All" Version="..." />
</ItemGroup>

Transitive dependencies (DotnetPoi.Common, DotnetPoi.POIFS) are resolved automatically by NuGet.

Why Multiple Packages?

PackageContentsBest for
DotnetPoi.OoxmlXSSF (xlsx/xlsm), XWPF (docx/docm), XSLF (pptx/pptm)Modern Office 2007+ formats
DotnetPoi.LegacyHSSF (xls), HWPF (doc), HSLF (ppt)Legacy binary formats
DotnetPoi.FormulaFormula evaluator (IFormulaEvaluator, FormulaEvaluator, CellValue)Programmatic formula calculation
DotnetPoi.CommonSS interfaces, shared enums, XML writerIncluded transitively
DotnetPoi.POIFSOLE2/CFB container, encryption helpersIncluded transitively
DotnetPoi.AllAll of the above in one meta-packageConvenience

Design principle: Format packages have zero knowledge of Formula. Adding DotnetPoi.Formula to your project automatically enables createFormulaEvaluator() via lazy assembly discovery at runtime. Without it, the call throws a clear NotSupportedException.

Verify Installation

Create a file TestInstall.csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="DotnetPoi.Ooxml" Version="..." />
  </ItemGroup>
</Project>

Add Program.cs:

using DotnetPoi.XSSF.UserModel;

using var wb = new XSSFWorkbook();
var sheet = wb.createSheet("Test");
var row = sheet.createRow(0);
row.createCell(0).setCellValue("Hello, dotnet-poi!");

using var file = File.Create("test.xlsx");
wb.write(file);

Console.WriteLine("test.xlsx created successfully.");

Run:

dotnet run

Open test.xlsx in Excel or LibreOffice to confirm the content.

Package Split Details

See the Package Split page for the full design rationale.