![]() |
VOOZH | about |
dotnet add package HtmlToOpenXml.dll --version 3.4.1
NuGet\Install-Package HtmlToOpenXml.dll -Version 3.4.1
<PackageReference Include="HtmlToOpenXml.dll" Version="3.4.1" />
<PackageVersion Include="HtmlToOpenXml.dll" Version="3.4.1" />Directory.Packages.props
<PackageReference Include="HtmlToOpenXml.dll" />Project file
paket add HtmlToOpenXml.dll --version 3.4.1
#r "nuget: HtmlToOpenXml.dll, 3.4.1"
#:package HtmlToOpenXml.dll@3.4.1
#addin nuget:?package=HtmlToOpenXml.dll&version=3.4.1Install as a Cake Addin
#tool nuget:?package=HtmlToOpenXml.dll&version=3.4.1Install as a Cake Tool
👁 Latest version
👁 Download Counts
👁 MIT License
HtmlToOpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments into Word.
This library supports both .Net Framework 4.6.2, .NET Standard 2.0, .NET 8 .NET 10 which are all LTS.
Depends on DocumentFormat.OpenXml and AngleSharp.
Refer to w3schools’ tag list to see their meaning
ah1-h6abbr and acronymb, i, u, s, del, ins, em, strike, strongbr and hrimg, figcaption and svgtable, td, tr, th, tbody, thead, tfoot, caption and colcitediv, span, time, font and ppresub and supul, ol and lidd and dtq, blockquote, dfnarticle, aside, section are considered like divJavascript (script), CSS style, meta, comments, buttons and input controls are ignored.
Other tags are treated like div.
In v1 and v2, Javascript (script), CSS style, meta, comments and other not supported tags does not generate an error but are ignored.
In v3, the parsing of the Html relies on AngleSharp package, which follows the W3C specifications and actively supports Html5.
In v1 and v2, the parsing of the Html was done using a custom Regex-based enumerator and was more flexible, but leaving a complex code, hard to maintain.
My reference bibles cover both OpenXml and HTML:
Open MS Word or Apple Pages and design your expected output. Save as a DOCX file, then rename as a ZIP. Extract the content and inspect those files:
document.xml, numbering.xml (for list) and styles.xml.
Thank you to all contributors that share their bug fixes (in no particular order): scwebgroup, ddforge, daviderapicavoli, worstenbrood, jodybullen, BenBurns, OleK, scarhand, imagremlin, antgraf, mdeclercq, pauldbentley, xjpmauricio, jairoXXX, giorand, bostjanKlemenc, AaronLS, taishmanov. And thanks to David Podhola for the Nuget package.
Logo provided with the permission of Enhanced Labs Design Studio.
This project is open source and I do my best to support it in my spare time. I'm always happy to receive Pull Request and grateful for the time you have taken. Please target branch dev only.
If you have questions, don't hesitate to get in touch with me!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on HtmlToOpenXml.dll:
| Package | Downloads |
|---|---|
|
BBTRulesEngine
BBT Rules Engine |
|
|
Magicodes.IE.Word
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html. 导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。 开源库地址:https://github.com/xin-lai 博客地址:http://www.cnblogs.com/codelove/ 更新记录:https://github.com/dotnetcore/Magicodes.IE/blob/master/RELEASE.md 公众号:麦扣聊技术 交流QQ群:85318032 |
|
|
MiniWords
.NET Word(docx) exporting template engine without COM+ and interop (support Linux and Mac) |
|
|
BootstrapBlazor.Table.ImportExportsService
BootstrapBlazor Table 数据导入导出服务扩展包(Excel/Word/Html/Pdf) |
|
|
Manacost.AB
Description |
Showing the top 3 popular GitHub repositories that depend on HtmlToOpenXml.dll:
| Repository | Stars |
|---|---|
|
dotnetcore/Magicodes.IE
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
|
|
|
CervantesSec/cervantes
Cervantes is an open-source, collaborative platform designed specifically for pentesters and red teams. It serves as a comprehensive management tool, streamlining the organization of projects, clients, vulnerabilities, and reports in a single, centralized location.
|
|
|
densen2014/Blazor100
Blazor入门100天
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.4.1 | 10,120 | 5/31/2026 | |
| 3.4.0 | 1,588 | 5/28/2026 | |
| 3.3.2 | 39,897 | 4/14/2026 | |
| 3.3.1 | 104,290 | 1/24/2026 | |
| 3.3.0 | 18,007 | 1/14/2026 | |
| 3.2.8 | 154,070 | 10/20/2025 | |
| 3.2.7 | 103,313 | 9/4/2025 | |
| 3.2.6 | 56,582 | 8/11/2025 | 3.2.6 is deprecated. |
| 3.2.5 | 148,973 | 4/24/2025 | |
| 3.2.4 | 148,213 | 3/31/2025 | |
| 3.2.3 | 20,786 | 3/23/2025 | |
| 3.2.2 | 137,534 | 12/11/2024 | |
| 3.2.1 | 98,979 | 10/16/2024 | |
| 3.2.0 | 297,833 | 9/24/2024 | |
| 3.1.1 | 40,692 | 9/4/2024 | |
| 3.1.0 | 98,024 | 8/23/2024 | |
| 3.0.1 | 31,971 | 8/10/2024 | |
| 3.0.0 | 31,198 | 7/8/2024 | |
| 3.0.0-beta | 3,191 | 6/18/2024 | |
| 2.4.2 | 171,567 | 2/18/2024 |