{"id":23433742,"url":"https://github.com/onizet/html2openxml","last_synced_at":"2025-05-14T07:08:16.319Z","repository":{"id":37432511,"uuid":"94113607","full_name":"onizet/html2openxml","owner":"onizet","description":"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 into templated Word.","archived":false,"fork":false,"pushed_at":"2025-04-24T12:55:03.000Z","size":2072,"stargazers_count":364,"open_issues_count":8,"forks_count":118,"subscribers_count":18,"default_branch":"dev","last_synced_at":"2025-04-24T13:07:15.190Z","etag":null,"topics":["docx","dotnet-core","openxml","openxml-sdk"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onizet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-12T15:47:15.000Z","updated_at":"2025-04-24T12:49:35.000Z","dependencies_parsed_at":"2024-01-25T21:27:53.449Z","dependency_job_id":"9cc617b2-042e-4c8f-831f-77dfe1f91d88","html_url":"https://github.com/onizet/html2openxml","commit_stats":{"total_commits":167,"total_committers":26,"mean_commits":6.423076923076923,"dds":0.592814371257485,"last_synced_commit":"d590063f009315e8d2ec1a0392525143642787f2"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onizet%2Fhtml2openxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onizet%2Fhtml2openxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onizet%2Fhtml2openxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onizet%2Fhtml2openxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onizet","download_url":"https://codeload.github.com/onizet/html2openxml/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092657,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docx","dotnet-core","openxml","openxml-sdk"],"created_at":"2024-12-23T11:27:21.308Z","updated_at":"2025-05-14T07:08:16.288Z","avatar_url":"https://github.com/onizet.png","language":"C#","readme":"![Latest version](https://img.shields.io/nuget/v/HtmlToOpenXml.dll.svg)\n![Download Counts](https://img.shields.io/nuget/dt/HtmlToOpenXml.dll.svg)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/onizet/html2openxml/blob/dev/LICENSE)\n\n# What is HtmlToOpenXml?\n\nHtmlToOpenXml 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.\n\nThis library supports both **.Net Framework 4.6.2**, **.NET Standard 2.0** and **.NET 8** which are all LTS.\n\nDepends on [DocumentFormat.OpenXml](https://www.nuget.org/packages/DocumentFormat.OpenXml/) and [AngleSharp](https://www.nuget.org/packages/AngleSharp).\n\n-\u003e [Official Nuget Package](https://www.nuget.org/packages/HtmlToOpenXml.dll)\n\n## See Also\n\n* [Documentation](https://github.com/onizet/html2openxml/wiki)\n* [How to deliver a generated DOCX from server Asp.Net/SharePoint?](https://github.com/onizet/html2openxml/wiki/Serves-a-generated-docx-from-the-server)\n* [Prevent Document Edition](https://github.com/onizet/html2openxml/wiki/Prevent-Document-Edition)\n* [Convert dotx to docx](https://github.com/onizet/html2openxml/wiki/Convert-.dotx-to-.docx)\n\n## Supported Html tags\n\nRefer to [w3schools’ tag](http://www.w3schools.com/tags/default.asp) list to see their meaning\n\n* `a`\n* `h1-h6`\n* `abbr` and `acronym`\n* `b`, `i`, `u`, `s`, `del`, `ins`, `em`, `strike`, `strong`\n* `br` and `hr`\n* `img`, `figcaption` and `svg`\n* `table`, `td`, `tr`, `th`, `tbody`, `thead`, `tfoot`, `caption` and `col`\n* `cite`\n* `div`, `span`, `time`, `font` and `p`\n* `pre`\n* `sub` and `sup`\n* `ul`, `ol` and `li`\n* `dd` and `dt`\n* `q`, `blockquote`, `dfn`\n* `article`, `aside`, `section` are considered like `div`\n\nJavascript (`script`), CSS `style`, `meta`, comments, buttons and input controls are ignored.\nOther tags are treated like `div`.\n\nIn v1 and v2, Javascript (`script`), CSS `style`, `meta`, comments and other not supported tags does not generate an error but are **ignored**.\n\n## Html Parser\n\nIn v3, the parsing of the Html relies on AngleSharp package, which follows the W3C specifications and actively supports Html5.\n\nIn 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.\n\n## How to implement or debug features\n\nMy reference bibles cover both OpenXml and HTML:\n\n* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML)\n* [W3Schools](https://www.w3schools.com/html/default.asp)\n* [OpenXml MSDN](https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing?view=openxml-3.0.1)\n\nOpen 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:\n`document.xml`, `numbering.xml` (for list) and `styles.xml`.\n\n## Acknowledgements\n\nThank 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.\nAnd thanks to David Podhola for the Nuget package.\n\nLogo provided with the permission of [Enhanced Labs Design Studio](http://www.enhancedlabs.com).\n\n## Support\n\nThis 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.\nIf you have questions, don't hesitate to get in touch with me!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonizet%2Fhtml2openxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonizet%2Fhtml2openxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonizet%2Fhtml2openxml/lists"}