Nedev.FileConverters.XlsxToHtml 0.1.0

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

Nedev.FileConverters.XlsxToHtml

A high-performance, zero-dependency library and CLI for converting Excel (.xlsx) files to HTML targeting .NET 8.0 (and the library also supports .NETStandard 2.1).

Features

  • No third-party dependencies – only .NET Base Class Library.
  • Streaming XML parsing for low memory usage.
  • Inline CSS styles reflecting cell formatting (fonts, colors, number/date formats; bold, italic, underline, background colors).
  • Advanced number formatting: percent, fractions, conditional sections, and custom format strings are interpreted when possible (including basic color codes, positive/negative sections, and hex color specifications).

Custom colors

A static helper is exposed for named color lookup. Call ColorHelper.AddOrUpdate("name", "#RRGGBB") before conversion to register additional mappings (e.g. "orchid").

Formulas

If a cell contains a formula (<f> element) the HTML <td> will receive a title attribute containing the formula prefixed with =; the displayed value normally remains the cached result.
A runtime option allows basic evaluation of formulas (arithmetic, cell refs, ranges, SUM, AVERAGE):

var writer = new HtmlWriter { EvaluateFormulas = true };
  • Console utility for batch conversions.

Usage

Convert a workbook to HTML using the CLI:

dotnet run --project src/Nedev.FileConverters.XlsxToHtml.Cli -- input.xlsx output.html

Omitting the output path will dump the HTML to standard output, making it easy to pipe.

Conversion is streaming and efficient; the entire document is never loaded into a DOM.

Building & Testing

The library multi-targets .NET 8.0 and .NET Standard 2.1; the CLI and tests target .NET 8.0.

This project depends on the Nedev.FileConverters.Core NuGet package. The library implements IFileConverter and is decorated with [FileConverter("xlsx","html")], enabling automatic discovery by the core infrastructure. The CLI also consumes the static Converter.Convert entry point from the core package.

Use the core API like so:

using Nedev.FileConverters;
using var outStream = Converter.Convert(inStream, "xlsx", "html");
# build all projects (run from repo root)
dotnet build src/Nedev.FileConverters.XlsxToHtml.slnx

# run unit tests for the path-based solution
dotnet test src/Nedev.FileConverters.XlsxToHtml.slnx

Limitations

  • Formulas are not evaluated by default; set HtmlWriter.EvaluateFormulas to true for simple expressions.
  • Images/charts and complex features (merged cells, comments) are not supported yet.

This repository is structured under src/ following .NET best practices.

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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
0.1.0 87 3/6/2026