{"id":16243972,"url":"https://github.com/fei-sheng-wu/xlsxtohtmlconverter","last_synced_at":"2026-02-08T07:27:42.475Z","repository":{"id":53573457,"uuid":"263810911","full_name":"Fei-Sheng-Wu/XlsxToHtmlConverter","owner":"Fei-Sheng-Wu","description":"A fast Xlsx to Html file converter. Support cell fills, fonts, borders, alignments, and other styles. Support different cell sizes and merged cells. Support custom number formats and basic conditions. Support multiple sheets and hidden sheets. Support embedded pictures. Support progress callbacks. Only depend on the Microsoft Open Xml SDK.","archived":false,"fork":false,"pushed_at":"2024-09-22T22:30:25.000Z","size":6448,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T09:45:34.836Z","etag":null,"topics":["conversion","convert","converter","csharp","dotnet","excel","excel-converter","excel-exporter","excel-parser","excel-to-html","html","html-creator","xlsx","xlsx-converter","xlsx-exporter","xlsx-parser","xlsx-to-html"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/XlsxToHtmlConverter","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/Fei-Sheng-Wu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2020-05-14T04:01:39.000Z","updated_at":"2025-03-11T15:23:03.000Z","dependencies_parsed_at":"2024-02-25T05:27:44.571Z","dependency_job_id":"3be4f66b-9375-49f7-9a74-0cd0d4763a10","html_url":"https://github.com/Fei-Sheng-Wu/XlsxToHtmlConverter","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fei-Sheng-Wu%2FXlsxToHtmlConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fei-Sheng-Wu%2FXlsxToHtmlConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fei-Sheng-Wu%2FXlsxToHtmlConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fei-Sheng-Wu%2FXlsxToHtmlConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fei-Sheng-Wu","download_url":"https://codeload.github.com/Fei-Sheng-Wu/XlsxToHtmlConverter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244474175,"owners_count":20458601,"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":["conversion","convert","converter","csharp","dotnet","excel","excel-converter","excel-exporter","excel-parser","excel-to-html","html","html-creator","xlsx","xlsx-converter","xlsx-exporter","xlsx-parser","xlsx-to-html"],"created_at":"2024-10-10T14:17:09.377Z","updated_at":"2026-02-08T07:27:42.460Z","avatar_url":"https://github.com/Fei-Sheng-Wu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XlsxToHtmlConverter v2.1.0\n\n[![Language](https://img.shields.io/badge/Language-C%23-lightgray.svg?style=flat-square)](#)\n[![.NET](https://img.shields.io/badge/.NET-%E2%89%A56.0-orange.svg?style=flat-square)](#)\n[![.NET Standard](https://img.shields.io/badge/.NET%20Standard-%E2%89%A52.1-orange.svg?style=flat-square)](#)\n[![NuGet](https://img.shields.io/nuget/v/XlsxToHtmlConverter?label=NuGet\u0026style=flat-square\u0026logo=nuget)](https://www.nuget.org/packages/XlsxToHtmlConverter)\n[![Downloads](https://img.shields.io/nuget/dt/XlsxToHtmlConverter?label=Downloads\u0026style=flat-square\u0026logo=nuget)](https://www.nuget.org/packages/XlsxToHtmlConverter)\n[![Commits Since](https://img.shields.io/github/commits-since/Fei-Sheng-Wu/XlsxToHtmlConverter/latest?label=Commits%20Since\u0026style=flat-square)](#)\n[![License](https://img.shields.io/github/license/Fei-Sheng-Wu/XlsxToHtmlConverter?label=License\u0026style=flat-square)](LICENSE.txt)\n\n\u003e A fast, versatile, and powerful XLSX to HTML converter. Support an extensive scope of cell stylings and additional elements. Empower the efficient transformation of spreadsheets into well-structured web documents. Provide the ability to easily customize every aspect of the conversion process with progress callbacks. Only depend on the Open XML SDK.\n\n## Dependencies\n\n- [DocumentFormat.OpenXml](https://github.com/dotnet/Open-XML-SDK) ≥ 3.0.0, \u003c 4.0.0\n\n## Features\n\n- [x] Cell structures, sizes, fonts, fills, borders, alignments, and visibilities\n- [x] Content presentation with number formats and basic conditional formats\n- [x] Elements of pictures and shapes with responsive positioning\n- [x] HTML construction with configurable details and modernized organization\n\n| Original XLSX File |\n| :---: |\n| ![Original XLSX File](sample-xlsx.png) |\n\n| Converted HTML File |\n| :---: |\n| ![Converted HTML File](sample-html.png) |\n\n## Versioning\n\nFor versions ≥ 2.0.0, the versioning of XlsxToHtmlConverter conforms to the following scheme:\n\n| Generation | | Major | | Minor |\n| :--- | :---: | :--- | :---: | :--- |\n| **2** | . | **1** | . | **0** |\n| _(backward-incompatible)_ | | _(backward-incompatible)_ | | _(backward-compatible)_ |\n| Significant codebase refactors. | | Severe bug fixes and core improvements. | | Mild changes. |\n\nThe changelogs are available at the [Releases](https://github.com/Fei-Sheng-Wu/XlsxToHtmlConverter/releases).\n\n## How to Use\n\nOnly one line to convert a local XLSX file to HTML:\n\n```c#\nXlsxToHtmlConverter.Converter.Convert(@\"C:\\path\\to\\input.xlsx\", @\"C:\\path\\to\\output.html\");\n```\n\nSimilarly, the use of `Stream` is supported:\n\n```c#\nStream input = ...;\nStream output = ...;\nXlsxToHtmlConverter.Converter.Convert(input, output);\n```\n\nAlternatively, the input may also be a `DocumentFormat.OpenXml.Packaging.SpreadsheetDocument` instance:\n\n```c#\nusing DocumentFormat.OpenXml.Packaging;\n```\n```c#\nSpreadsheetDocument input = ...;\nStream output = ...;\nXlsxToHtmlConverter.Converter.Convert(input, output);\n```\n\n### Conversion Configuration\n\nA third optional parameter can be set to configure the conversion process:\n\n```c#\nXlsxToHtmlConverter.ConverterConfiguration configuration = new()\n{\n    BufferSize = 65536,\n    Encoding = Encoding.UTF8,\n    NewlineCharacter = \"\\n\",\n    TabCharacter = new(' ', 2),\n    RoundingDigits = 2,\n    CurrentCulture = CultureInfo.CurrentCulture,\n    HtmlTitle = null,\n    HtmlPresetStylesheet = ...,\n    XlsxSheetSelector = null,\n    ConvertSheetTitles = true,\n    ConvertSizes = true,\n    ConvertVisibilities = true,\n    ConvertStyles = true,\n    ConvertNumberFormats = true,\n    ConvertPictures = true,\n    ConvertShapes = true,\n    UseHtmlFragment = false,\n    UseHtmlClasses = true,\n    UseHtmlHexColors = true,\n    UseHtmlProportionalWidths = true,\n    UseHtmlDataElements = true,\n    ...\n};\nXlsxToHtmlConverter.Converter.Convert(..., ..., configuration);\n```\n\n### Progress Callback\n\nA fourth optional parameter can be set to add a progress callback event handler:\n\n```c#\nXlsxToHtmlConverter.Converter.Convert(..., ..., ..., HandleProgressChanged);\n```\n```c#\nprivate void HandleProgressChanged(DocumentFormat.OpenXml.Packaging.SpreadsheetDocument? sender, XlsxToHtmlConverter.ConverterProgressChangedEventArgs e)\n{\n    string summary = $\"Sheet {e.CurrentSheet} of {e.SheetCount} | Row {e.CurrentRow} of {e.RowCount}\";\n    string progress = new string('█', (int)Math.Round(e.ProgressPercentage / 100.0 * 50)).PadRight(50, '░');\n    Console.Write($\"{e.ProgressPercentage:F2}% ({summary}) {progress}\");\n}\n```\n\n## License\n\nThis project is under the [MIT License](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffei-sheng-wu%2Fxlsxtohtmlconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffei-sheng-wu%2Fxlsxtohtmlconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffei-sheng-wu%2Fxlsxtohtmlconverter/lists"}