PowGrade.FileConverters.XlsxToHtml 0.1.0

dotnet add package PowGrade.FileConverters.XlsxToHtml --version 0.1.0
                    
NuGet\Install-Package PowGrade.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="PowGrade.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="PowGrade.FileConverters.XlsxToHtml" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PowGrade.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 PowGrade.FileConverters.XlsxToHtml --version 0.1.0
                    
#r "nuget: PowGrade.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 PowGrade.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=PowGrade.FileConverters.XlsxToHtml&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=PowGrade.FileConverters.XlsxToHtml&version=0.1.0
                    
Install as a Cake Tool

PowGrade.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/PowGrade.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 PowGrade.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 PowGrade.FileConverters;
using var outStream = Converter.Convert(inStream, "xlsx", "html");
# build all projects (run from repo root)
dotnet build src/PowGrade.FileConverters.XlsxToHtml.slnx

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

Limitations

  • Formulas are not evaluated by default; set HtmlWriter.EvaluateFormulas to true for simple expressions.
  • Images/charts and comments are not supported yet.

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

Product Compatible and additional computed target framework versions.
.NET 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. 
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 PowGrade.FileConverters.XlsxToHtml:

Package Downloads
PowGrade.FileConverters.XlsxToHtml.Cli

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 150 4/30/2026