XlsxToHtmlConverter 2.1.1
dotnet add package XlsxToHtmlConverter --version 2.1.1
NuGet\Install-Package XlsxToHtmlConverter -Version 2.1.1
<PackageReference Include="XlsxToHtmlConverter" Version="2.1.1" />
<PackageVersion Include="XlsxToHtmlConverter" Version="2.1.1" />
<PackageReference Include="XlsxToHtmlConverter" />
paket add XlsxToHtmlConverter --version 2.1.1
#r "nuget: XlsxToHtmlConverter, 2.1.1"
#:package XlsxToHtmlConverter@2.1.1
#addin nuget:?package=XlsxToHtmlConverter&version=2.1.1
#tool nuget:?package=XlsxToHtmlConverter&version=2.1.1
XlsxToHtmlConverter v2.1.1
A fast, versatile, and powerful XLSX to HTML converter. Support an extensive scope of cell stylings and additional elements. Empower the efficient transformation of spreadsheets into well-structured web documents. Provide the ability to easily customize every aspect of the conversion process with progress callbacks. Only depend on the Open XML SDK.
Dependencies
- DocumentFormat.OpenXml ≥ 3.0.0, < 4.0.0
Features
- Cell structures, sizes, fonts, fills, borders, alignments, and visibilities
- Content presentation with number formats and basic conditional formats
- Elements of pictures and shapes with responsive positioning
- HTML construction with configurable details and modernized organization
| Original XLSX File |
|---|
![]() |
| Converted HTML File |
|---|
![]() |
Versioning
For versions ≥ 2.0.0, the versioning of XlsxToHtmlConverter conforms to the following scheme:
| Generation | Major | Minor | ||
|---|---|---|---|---|
| 2 | . | 1 | . | 1 |
| (backward-incompatible) | (backward-incompatible) | (backward-compatible) | ||
| Significant codebase refactors. | Severe bug fixes and core improvements. | Mild changes. |
The changelogs are available at the Releases.
How to Use
Only one line to convert a local XLSX file to HTML:
XlsxToHtmlConverter.Converter.Convert(@"C:\path\to\input.xlsx", @"C:\path\to\output.html");
Similarly, the use of Stream is supported:
Stream input = ...;
Stream output = ...;
XlsxToHtmlConverter.Converter.Convert(input, output);
Alternatively, the input may also be a DocumentFormat.OpenXml.Packaging.SpreadsheetDocument instance:
using DocumentFormat.OpenXml.Packaging;
SpreadsheetDocument input = ...;
Stream output = ...;
XlsxToHtmlConverter.Converter.Convert(input, output);
Conversion Configuration
A third optional parameter can be set to configure the conversion process:
XlsxToHtmlConverter.ConverterConfiguration configuration = new()
{
BufferSize = 65536,
Encoding = Encoding.UTF8,
NewlineCharacter = "\n",
TabCharacter = new(' ', 2),
RoundingDigits = 2,
CurrentCulture = CultureInfo.CurrentCulture,
HtmlTitle = null,
HtmlPresetStylesheet = ...,
XlsxSheetSelector = null,
ConvertSheetTitles = true,
ConvertSizes = true,
ConvertVisibilities = true,
ConvertStyles = true,
ConvertNumberFormats = true,
ConvertPictures = true,
ConvertShapes = true,
UseHtmlFragment = false,
UseHtmlClasses = true,
UseHtmlHexColors = true,
UseHtmlProportionalWidths = true,
UseHtmlDataElements = true,
...
};
XlsxToHtmlConverter.Converter.Convert(..., ..., configuration);
Progress Callback
A fourth optional parameter can be set to add a progress callback event handler:
XlsxToHtmlConverter.Converter.Convert(..., ..., ..., HandleProgressChanged);
private void HandleProgressChanged(DocumentFormat.OpenXml.Packaging.SpreadsheetDocument? sender, XlsxToHtmlConverter.ConverterProgressChangedEventArgs e)
{
string summary = $"Sheet {e.CurrentSheet} of {e.SheetCount} | Row {e.CurrentRow} of {e.RowCount}";
string progress = new string('█', (int)Math.Round(e.ProgressPercentage / 100.0 * 50)).PadRight(50, '░');
Console.Write($"{e.ProgressPercentage:F2}% ({summary}) {progress}");
}
License
This project is under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 | 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
- DocumentFormat.OpenXml (>= 3.0.0 && < 4.0.0)
-
net6.0
- DocumentFormat.OpenXml (>= 3.0.0 && < 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.

