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
<PackageReference Include="Nedev.FileConverters.XlsxToHtml" Version="0.1.0" />
<PackageVersion Include="Nedev.FileConverters.XlsxToHtml" Version="0.1.0" />
<PackageReference Include="Nedev.FileConverters.XlsxToHtml" />
paket add Nedev.FileConverters.XlsxToHtml --version 0.1.0
#r "nuget: Nedev.FileConverters.XlsxToHtml, 0.1.0"
#:package Nedev.FileConverters.XlsxToHtml@0.1.0
#addin nuget:?package=Nedev.FileConverters.XlsxToHtml&version=0.1.0
#tool nuget:?package=Nedev.FileConverters.XlsxToHtml&version=0.1.0
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.EvaluateFormulastotruefor 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 | Versions 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. |
-
.NETStandard 2.1
- Nedev.FileConverters.Core (>= 0.1.0)
-
net8.0
- Nedev.FileConverters.Core (>= 0.1.0)
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 |