# html2openxml
**Repository Path**: CrazyIterBin/html2openxml
## Basic Information
- **Project Name**: html2openxml
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: dev
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-01-19
- **Last Updated**: 2024-01-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://www.nuget.org/packages/HtmlToOpenXml.dll)
[](https://github.com/onizet/html2openxml/blob/master/LICENSE)
[]()
[](https://codecov.io/github/onizet/html2openxml?branch=master)
[](https://img.shields.io/badge/netstandard-1.3-brightgreen.svg)
[](https://img.shields.io/badge/netstandard-2.0-brightgreen.svg)
[](https://img.shields.io/badge/net-46-brightgreen.svg)
# What is Html2OpenXml?
Html2OpenXml 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 from SharePoint to Word.
This library supports both **.Net Core (netstandard1.3)** and **.Net Framework 4.6**.
Depends on [DocumentFormat.OpenXml](https://www.nuget.org/packages/DocumentFormat.OpenXml/).
## See Also
* [Documentation](https://github.com/onizet/html2openxml/wiki)
* [How to deliver a generated DOCX from server Asp.Net/SharePoint?](https://github.com/onizet/html2openxml/wiki/Serves-a-generated-docx-from-the-server)
* [Prevent Document Edition](https://github.com/onizet/html2openxml/wiki/Prevent-Document-Edition)
* [Convert dotx to docx](https://github.com/onizet/html2openxml/wiki/Convert-.dotx-to-.docx)
## Supported Html tags
Refer to [w3schools’ tag](http://www.w3schools.com/tags/default.asp) list to see their meaning
* <a>
* <h1-h6>
* <abbr> and <acronym>
* <b>, <i>, <u>, <s>, <del>, <ins>, <em>, <strike>, <strong>
* <br> and <hr>
* <img>, <figcaption>
* <table>, <td>, <tr>, <th>, <tbody>, <thead>, <tfoot> and <caption>
* <cite>
* <div>, <span>, <font> and <p>
* <pre>
* <sub> and <sup>
* <ul>, <ol> and <li>
* <dd> and <dt>
* <q> and <blockquote> (since 1.5)
* <article>, <aside>, <section> are considered like <div>
Javascript (<script>), CSS <style>, <meta> and other not supported tags does not generate an error but are **ignored**.
## Tolerance for bad formed HTML
The parsing of the Html is done using a custom Regex-based enumerator. These are supported:
| | samples |
| ------------- | ------------- |
| Ignore case | <span>Some text<SPAN> |
| Missing closing tag or invalid tag position | <i>Here<b> is </i> some</b> bad formed html. |
| no need to be XHTML compliant | Both <br> and <br/> are valid |
| Color | red, #ff0000, #f00, rgb(255,0,0,.5), hsl(0, 100%, 50%) are all the red color |
| Attributes | <table id=table1> or <table id="table1"> |
## Acknowledgements
Thank you to all contributors that share their bug fixes: 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](http://www.enhancedlabs.com).
## Support
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
If you have questions, don't hesitate to get in touch with me!