lynMarkdigRenderTest63 1.0.0
dotnet add package lynMarkdigRenderTest63 --version 1.0.0
NuGet\Install-Package lynMarkdigRenderTest63 -Version 1.0.0
<PackageReference Include="lynMarkdigRenderTest63" Version="1.0.0" />
paket add lynMarkdigRenderTest63 --version 1.0.0
#r "nuget: lynMarkdigRenderTest63, 1.0.0"
// Install lynMarkdigRenderTest63 as a Cake Addin #addin nuget:?package=lynMarkdigRenderTest63&version=1.0.0 // Install lynMarkdigRenderTest63 as a Cake Tool #tool nuget:?package=lynMarkdigRenderTest63&version=1.0.0
XlsxToHtmlConverter
A xlsx to html file converter. Support 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. 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
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.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
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.0.0 | 0 | 11/24/2020 |