NanoXLSX.Formatting 3.0.0

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

NanoXLSX

NanoXLSX.Formatting

NuGet Version NuGet Downloads GitHub License

NanoXLSX is a small .NET library written in C#, to create and read Microsoft Excel files in the XLSX format (Microsoft Excel 2007 or newer) in an easy and native way


The Formatting package is responsible to enable NanoXLSX for the handling of structured text within a text cell (inline formatting).

Currently supported:

  • Adding text runs (paragraphs) by a Builder or manually
  • Defining Font styles per run
  • Adding phonetic information (important for East Asian languages)
  • Reading and writing runs, phonetic information and inline Font styles

Project website: https://picoxlsx.rabanti.ch

See the Change Log for recent updates.

What's new in version 3.x

This is the first release if this package. It was set to v 3.x, to be consistent with the NanoXLSX v3 ecosystem

Road map

Planned features:

  • Style builder for general cell styles
  • Assistant for valid custom format codes
  • Support for conditional cell formatting

Requirements

NanoXLSX.Formatting is not intended as standalone package. It requires NanoXLSX.Core, and is normally part of the meta-package NanoXLSX

You find all technical requirements in the main repository: NanoXLSX

General requirements

  • .NET 4.5 or newer / .NET Standard
  • NanoXLSX.Core as only dependency

Utility dependencies

The Test project and GitHub Actions may also require dependencies like unit testing frameworks or workflow steps. However, none of these dependencies are essential to build the library. They are just utilities. The test dependencies ensure efficient unit testing and code coverage. The GitHub Actions dependencies are used for the automatization of releases and API documentation

Installation

Using NuGet

By package Manager (PM):

Install-Package NanoXLSX.Formatting

By .NET CLI:

dotnet add package NanoXLSX.Formatting

Usage

Quick Start (manual)

Workbook workbook = new Workbook("sheet1");                          // Create new workbook
FormattedText formattedText = new FormattedText();                   // Create new formatted text
Font strikeFont = new Font() { Strike = true };                      // Create a new font style
formattedText.AddRun("strike", strikeFont);                          // Add text and style as run to the formatted text
formattedText.AddLineBreak();                                        // Add a line break after the first run
Font boldFont = new Font() { Bold = true, Name = "Tahoma" };         // Create a second font
formattedText.AddRun("bold", boldFont);                              // Add a second run to the formatted text
workbook.CurrentWorksheet.AddFormattedTextCell(formattedText, "A1"); // Add formatted text to the worksheet

Quick Start (builders)

Workbook workbook = new Workbook("sheet1");                            // Create new workbook
InlineStyleBuilder inlineStyleBuilder = new InlineStyleBuilder()       // Create a new inline style builder
    .Color("FFAABBCC")                                                 // Add properties to the builder
    .Italic()
    .Size(18);
FormattedTextBuilder builder = new FormattedTextBuilder();             // Create a new formatted text builder
builder.AddRun("朝日", inlineStyleBuilder.Build());                     // Add a text and style to the builder
builder.AddPhoneticRun("あさひ", 0, 2);                                 // Add a phonetic run  to the builder
builder.AddRun("Asahi", new Font() { VerticalAlign = Font.VerticalTextAlignValue.Superscript }); // Add another text and style to the builder
workbook.CurrentWorksheet.AddFormattedTextCell(builder.Build(), 0, 0); // Create the formatted text and add it to the cell                                     // Save the workbook as myWorkbook.xlsx

Further References

License

NanoXLSX.Formatting is published under the MIT license.

The project / package is developed with as much compliance to this license as only possible. Please visit the main repository NanoXLSX for compliance a scan, provided by Fossa

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 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.  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 net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  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 (2)

Showing the top 2 NuGet packages that depend on NanoXLSX.Formatting:

Package Downloads
NanoXLSX

NanoXLSX is a library to generate and read Microsoft Excel files (XLSX) in an easy and native way. This package is the meta package of NanoXLSX and should be used in most cases as dependency in your project.

PicoXLSX

PicoXLSX is a library to generate Microsoft Excel files (XLSX) in an easy and native way. This package is the meta package of PicoXLSX and should be used in most cases as dependency in your project. It uses the dependencies of NanoXLSX

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 0 2/28/2026
3.0.0-rc.1 60 2/11/2026