NanoXLSX.Compatibility 3.2.0

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

NanoXLSX

NanoXLSX.Compatibility

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 Compatibility package is responsible to add compatibility functions to NanoXLSX. Such functions may be not be used as frequently, but are especially important, when Workbooks are loaded that were created by Microsoft Excel or other Generators.

Currently supported:

  • Handling of external links

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

Possible future features (not yet in backlog):

  • Preservation of workbook elements that are not implemented in NanoXLSX, when a workbook is loaded

🤖 For AI Agents

For AI agents and LLM tooling, a machine-readable llms.txt is available in the main repository.

If you add external links as:

  • Part of a defined name formula
  • Part of a cell formula

... keep in mind: The formula is not checked or validated by this package. It may lead to an invalid Excel file, if you add a non-compliant formula. For example:

// The following defined name is invalid and will cause a repair dialog when opening with Excel
workbook.AddDefinedNameFormula("invalidDefinedName", "C:\\temp\\[ext.xlsx]worksheet1!$A$3+$A$4");
// The following defined name would be valid
workbook.AddDefinedNameFormula("invalidDefinedName", "C:\\temp\\[ext.xlsx]worksheet1!$A$3+C:\\temp\\[ext.xlsx]worksheet1!$A$4");

Furthermore, all external links, used in defined names and cells, must be registered, otherwise it will lead to a invalid workbook:

ExternalLink link = new ExternalLink(@"C:\temp\ext.xlsx", "ext.xlsx");

Last, but not least: All external links, used in formulas, are to be written as URIs / paths and not as identifiers like [1]. The URIs / paths are not checked (target file may exist or not).

Requirements

NanoXLSX.Compatibility 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.Compatibility

By .NET CLI:

dotnet add package NanoXLSX.Compatibility

Usage

Quick Start (manual)

 Workbook workbook = new Workbook("worksheet1");
 // Use external link in a cell formula
 workbook.CurrentWorksheet.AddNextCellFormula("C:\\temp\\[ext1.xlsx]worksheet1!$A$1"); 

// Use external link in a defined name
 workbook.AddDefinedNameFormula("extLink1", "SUM(C:\\temp\\[ext1.xlsx]worksheet1!$A$3:$A$4)"); // within a formula expression
 workbook.AddDefinedNameFormula("extLink2", "C:\\temp\\[ext2.xlsx]worksheet1!$A$3:$A$4"); // direct reference

// Creating mandatory external links
 ExternalLink link = new ExternalLink(@"C:\temp\ext1.xlsx", "ext1.xlsx");
 ExternalLink link2 = new ExternalLink(@"C:\temp\ext2.xlsx", "ext2.xlsx");
 // Alternatively, you can use:
 // ExternalLinkBuilder builder3 = new ExternalLinkBuilder(@"C:\temp\ext1.xlsx", "ext1.xlsx");

// Add cached data
 ExternalLinkBuilder builder = link.CreateBuilder();
 builder.AddWorksheet("worksheet1");
 builder.AddCell("A1", "test");
 builder.AddCell("A2", "1", ExternalCellValue.DataType.Boolean);
 builder.AddWorksheet("ext2");
 builder.AddCell("A1", "test2");

// Add cached data
 ExternalLinkBuilder builder2 = link2.CreateBuilder();
 builder2.AddWorksheet("worksheet1");
 builder2.AddCell("A1", "test");
 builder2.AddCell("A2", "1", ExternalCellValue.DataType.Boolean);
 builder2.AddCell("A3", "10", ExternalCellValue.DataType.Number);
 builder2.AddCell("A4", "20");
 builder2.AddWorksheet("worksheet2");
 builder2.AddCell("A1", "test2");

 link2 = builder2.Build();
 link2.AddDefinedName(new ExternalDefinedName("extDefName", "A2"));

// Register external links to the workbook (otherwise the workbook is invalid)
 workbook.AddExternalLink(builder); // using a builder
 workbook.AddExternalLink(link2); // sing the final 

 workbook.SaveAs(fileName);

Further References

License

NanoXLSX.Compatibility 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 (1)

Showing the top 1 NuGet packages that depend on NanoXLSX.Compatibility:

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.2.0 539 8/20/2026