XlsxToHtmlConverter 1.1.11

There is a newer version of this package available.
See the version list below for details.
dotnet add package XlsxToHtmlConverter --version 1.1.11                
NuGet\Install-Package XlsxToHtmlConverter -Version 1.1.11                
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="XlsxToHtmlConverter" Version="1.1.11" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XlsxToHtmlConverter --version 1.1.11                
#r "nuget: XlsxToHtmlConverter, 1.1.11"                
#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.
// Install XlsxToHtmlConverter as a Cake Addin
#addin nuget:?package=XlsxToHtmlConverter&version=1.1.11

// Install XlsxToHtmlConverter as a Cake Tool
#tool nuget:?package=XlsxToHtmlConverter&version=1.1.11                

XlsxToHtmlConverter

Target Framework Nuget Lincense

A xlsx to html file converter. Support cell fill, font, border, alignment and other styles. Support custom column width and row height. Support vertical and/or horizontal merged cells. Support sheet tab color and hidden sheet. Support pictures drawing. Support progress callback event. It uses .Net Core 3.0 as framework and only depends on the Open Xml SDK.

Dependencies

.Net Core >= 3.0
DocumentFormat.OpenXml = 2.10.1

Main Features

  • Cell fill, font, border, alignment, and other styles
  • Custom column width and row height
  • Vertical and/or horizontal merged cells
  • Sheet tab color and hidden sheet
  • Pictures drawing
  • Progress callback event

How to Use

Only one line to convert xlsx file to html string.

string html = XlsxToHtmlConverter.Converter.ConvertXlsx(xlsxFileName);

Or if xlsx file data is in the stream, convert the stream.

string html = XlsxToHtmlConverter.Converter.ConvertXlsx(xlsxFileStream);

You can even set your custom converter config.

XlsxToHtmlConverter.ConverterConfig config = new XlsxToHtmlConverter.ConverterConfig()
{
    PageTitle = "My Title",
    PresetStyles = "body { background-color: skyblue; } table { width: 100%; }",
    ErrorMessage = "Oh, no. It's error.",
    IsConvertStyles = true,
    IsConvertSizes = false,
    IsConvertPicture = true,
    IsConvertHiddenSheet = false
}

string html = XlsxToHtmlConverter.Converter.ConvertXlsx(xlsxFileName, config);

And you can convert file with progress callback event.

EventHandler<XlsxToHtmlConverter.ConverterProgressCallbackEventArgs> converterProgressCallbackEvent = null;
converterProgressCallbackEvent += ConverterProgressCallback;

string html = XlsxToHtmlConverter.Converter.ConvertXlsx(xlsxFileName, converterProgressCallbackEvent);

Also, you can use custom config and progress callback event together.

string html = XlsxToHtmlConverter.Converter.ConvertXlsx(xlsxFileName, config, converterProgressCallbackEvent);

License

This project is under the MIT License.

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. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 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
1.2.20 149 9/22/2024
1.2.19 160 9/1/2024
1.2.18 121 8/15/2024
1.2.17 92 8/7/2024
1.2.15 325 3/17/2024
1.2.13 118 3/17/2024
1.2.7 121 3/10/2024
1.2.1 109 2/20/2024
1.1.15 161 2/20/2024
1.1.14 18,090 10/8/2020
1.1.12 490 10/5/2020
1.1.11 632 10/3/2020
1.1.8 499 6/22/2020