{"id":28443145,"url":"https://github.com/soenneker/soenneker.blazor.sheetmapper","last_synced_at":"2026-06-14T16:00:49.836Z","repository":{"id":296061629,"uuid":"991645910","full_name":"soenneker/soenneker.blazor.sheetmapper","owner":"soenneker","description":"A Blazor component and utility library for mapping uploaded CSV or tabular files to C# objects. Supports header extraction and user-defined property mapping.","archived":false,"fork":false,"pushed_at":"2026-06-09T17:03:51.000Z","size":1108,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-09T18:22:30.820Z","etag":null,"topics":["blazor","blazorlibrary","blazorsheetmapper","csharp","csv","dotnet","excel","mapper","sheet","sheetmapper"],"latest_commit_sha":null,"homepage":"https://soenneker.com","language":"CSS","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/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"soenneker","thanks_dev":"soenneker"}},"created_at":"2025-05-28T00:21:16.000Z","updated_at":"2026-06-09T16:59:44.000Z","dependencies_parsed_at":"2026-04-17T04:01:41.711Z","dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.blazor.sheetmapper","commit_stats":null,"previous_names":["soenneker/soenneker.blazor.sheetmapper"],"tags_count":420,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.blazor.sheetmapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.blazor.sheetmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.blazor.sheetmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.blazor.sheetmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.blazor.sheetmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.blazor.sheetmapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.blazor.sheetmapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34326240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blazor","blazorlibrary","blazorsheetmapper","csharp","csv","dotnet","excel","mapper","sheet","sheetmapper"],"created_at":"2025-06-06T07:00:39.964Z","updated_at":"2026-06-14T16:00:49.766Z","avatar_url":"https://github.com/soenneker.png","language":"CSS","funding_links":["https://github.com/sponsors/soenneker","https://thanks.dev/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.blazor.sheetmapper.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.sheetmapper/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.blazor.sheetmapper/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.blazor.sheetmapper/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.blazor.sheetmapper.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.sheetmapper/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.blazor.sheetmapper/codeql.yml?label=CodeQL\u0026style=for-the-badge)](https://github.com/soenneker/soenneker.blazor.sheetmapper/actions/workflows/codeql.yml)\n\n# Soenneker.Blazor.SheetMapper\n\nA Blazor component and utility library for mapping CSV or tabular files to C# objects.\n\n![image](https://github.com/user-attachments/assets/7aa39358-be2d-47af-8f04-68ac37281112)\n\nLeverage [FilePond](https://github.com/soenneker/soenneker.blazor.filepond) for uploads and [TomSelect](https://github.com/soenneker/soenneker.blazor.tomselect) for interactive dropdowns. Automatically extract headers, map columns to your model, and retrieve a clean `{ property ? column }` map.\n\n[Demo](https://soenneker.github.io/soenneker.blazor.sheetmapper)\n\n## Features\n\n* **Header extraction** from CSV or tab-delimited files\n* **Interactive mapping** of columns to model properties\n* **Automatic heuristic mapping** (case- and whitespace-insensitive)\n* **Status icons** for *unmapped*, *duplicate*, and *mapped* states\n* **Show/hide** the status-icon column on demand\n* **API** to fetch the final mapping as `Dictionary\u003cstring, string\u003e`\n\n---\n\n## Installation\n\n```bash\ndotnet add package Soenneker.Blazor.SheetMapper\n```\n\n---\n\n## Setup\n\n1. **Register interop** in your DI container (e.g., `Program.cs`):\n\n   ```csharp\n   builder.Services.AddSheetMapperAsScoped();\n   ```\n\n2. **Import namespace** in your `_Imports.razor` or component:\n\n   ```razor\n   @using Soenneker.Blazor.SheetMapper\n   ```\n\n---\n\n## Basic Usage\n\n```razor\n@page \"/import\"\n@inject ISheetMapperInterop SheetMapperInterop\n\n\u003cSheetMapper\n    @ref=\"sheetMapper\"\n    TargetType=\"typeof(Employee)\"\n    AutomaticallyMap=\"true\"\n    ShowStatusIcons=\"true\" /\u003e\n\n\u003cbutton class=\"btn btn-primary mt-3\" @onclick=\"ShowMap\"\u003e\n    Get Mapping\n\u003c/button\u003e\n\n@code {\n    private SheetMapper? sheetMapper;\n\n    private void ShowMap()\n    {\n        if (sheetMapper is not null)\n        {\n            var map = sheetMapper.GetCurrentMap();\n            // map: property ? CSV column\n        }\n    }\n}\n```\n\n---\n\n## Component Parameters\n\n| Parameter          | Type             | Default | Description                                                    |\n| ------------------ | ---------------- | ------- | -------------------------------------------------------------- |\n| `TargetType`       | `Type`           | �       | **Required.** Model type whose writable properties are mapped. |\n| `AutomaticallyMap` | `bool`           | `false` | Run auto-mapping heuristic on file load.                       |\n| `ShowStatusIcons`  | `bool`           | `true`  | Toggle visibility of the status-icon column.                   |\n| `NotMappedIcon`    | `RenderFragment` | ??      | Icon/markup for unmapped state.                                |\n| `DuplicatedIcon`   | `RenderFragment` | ??      | Icon/markup for duplicate-mapping state.                       |\n| `MappedIcon`       | `RenderFragment` | ?       | Icon/markup for successful mapping.                            |\n\n---\n\n## Public API\n\n* `void AutoMap()`\n  Re-run the auto-mapping logic at any time.\n\n* `Dictionary\u003cstring, string\u003e GetCurrentMap()`\n  Returns `{ property ? selected column }`. Unmapped properties return `\"\"`.\n\n---\n\n## Customization\n\n### Status Icons\n\nOverride the built-in emojis with your own markup (SVG, `\u003ci\u003e`, etc.):\n\n```razor\n\u003cSheetMapper\n    TargetType=\"typeof(Employee)\"\n    NotMappedIcon=\"@\u003ci class='fas fa-exclamation-triangle'\u003e\u003c/i\u003e\"\n    DuplicatedIcon=\"@\u003ci class='fas fa-sync-alt'\u003e\u003c/i\u003e\"\n    MappedIcon=\"@\u003ci class='fas fa-check-circle'\u003e\u003c/i\u003e\"\n/\u003e\n```\n\n### Show/Hide Icon Column\n\nUse the `ShowStatusIcons` parameter to toggle the entire status-icon column:\n\n```razor\n\u003c!-- hides the icons --\u003e\n\u003cSheetMapper TargetType=\"typeof(Employee)\" ShowStatusIcons=\"false\" /\u003e\n```\n\n---\n\n## Styling\n\n* **CSS classes** for fine-tuning:\n\n  * `.map-row` � wrapper for each mapping row\n  * `.status-icon` � container for the icon\n\nOverride or extend them to match your design system.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.blazor.sheetmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.blazor.sheetmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.blazor.sheetmapper/lists"}