Soenneker.Blazor.SheetMapper 3.0.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Blazor.SheetMapper --version 3.0.3
                    
NuGet\Install-Package Soenneker.Blazor.SheetMapper -Version 3.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.SheetMapper" Version="3.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.SheetMapper" Version="3.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.SheetMapper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.SheetMapper --version 3.0.3
                    
#r "nuget: Soenneker.Blazor.SheetMapper, 3.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Blazor.SheetMapper@3.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blazor.SheetMapper&version=3.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.SheetMapper&version=3.0.3
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blazor.SheetMapper

A Blazor component and utility library for mapping CSV or tabular files to C# objects.

image

Leverage FilePond for uploads and TomSelect for interactive dropdowns. Automatically extract headers, map columns to your model, and retrieve a clean { property → column } map.

Demo

Features

  • Header extraction from CSV or tab-delimited files
  • Interactive mapping of columns to model properties
  • Automatic heuristic mapping (case‑ and whitespace‑insensitive)
  • Status icons for unmapped, duplicate, and mapped states
  • Show/hide the status‑icon column on demand
  • API to fetch the final mapping as Dictionary<string, string>

Installation

dotnet add package Soenneker.Blazor.SheetMapper

Setup

  1. Register interop in your DI container (e.g., Program.cs):

    builder.Services.AddSheetMapperAsScoped();
    
  2. Import namespace in your _Imports.razor or component:

    @using Soenneker.Blazor.SheetMapper
    

Basic Usage

@page "/import"
@inject ISheetMapperInterop SheetMapperInterop

<SheetMapper
    @ref="sheetMapper"
    TargetType="typeof(Employee)"
    AutomaticallyMap="true"
    ShowStatusIcons="true" />

<button class="btn btn-primary mt-3" @onclick="ShowMap">
    Get Mapping
</button>

@code {
    private SheetMapper? sheetMapper;

    private void ShowMap()
    {
        if (sheetMapper is not null)
        {
            var map = sheetMapper.GetCurrentMap();
            // map: property → CSV column
        }
    }
}

Component Parameters

Parameter Type Default Description
TargetType Type Required. Model type whose writable properties are mapped.
AutomaticallyMap bool false Run auto-mapping heuristic on file load.
ShowStatusIcons bool true Toggle visibility of the status‑icon column.
NotMappedIcon RenderFragment ⚠️ Icon/markup for unmapped state.
DuplicatedIcon RenderFragment 🔁 Icon/markup for duplicate‑mapping state.
MappedIcon RenderFragment Icon/markup for successful mapping.

Public API

  • void AutoMap() Re-run the auto-mapping logic at any time.

  • Dictionary<string, string> GetCurrentMap() Returns { property → selected column }. Unmapped properties return "".


Customization

Status Icons

Override the built-in emojis with your own markup (SVG, <i>, etc.):

<SheetMapper
    TargetType="typeof(Employee)"
    NotMappedIcon="@<i class='fas fa-exclamation-triangle'></i>"
    DuplicatedIcon="@<i class='fas fa-sync-alt'></i>"
    MappedIcon="@<i class='fas fa-check-circle'></i>"
/>

Show/Hide Icon Column

Use the ShowStatusIcons parameter to toggle the entire status‑icon column:


<SheetMapper TargetType="typeof(Employee)" ShowStatusIcons="false" />

Styling

  • CSS classes for fine‑tuning:

    • .map-row — wrapper for each mapping row
    • .status-icon — container for the icon

Override or extend them to match your design system.


License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.201 0 1/4/2026
4.0.200 0 1/4/2026
4.0.199 22 1/3/2026
4.0.198 27 1/3/2026
4.0.197 27 1/3/2026
4.0.196 30 1/3/2026
4.0.195 38 1/2/2026
4.0.194 37 1/2/2026
4.0.193 36 1/2/2026
4.0.192 39 12/31/2025
4.0.191 47 12/31/2025
4.0.190 58 12/31/2025
4.0.189 64 12/31/2025
4.0.188 80 12/28/2025
4.0.187 145 12/21/2025
4.0.186 151 12/21/2025
4.0.185 146 12/21/2025
4.0.184 149 12/21/2025
4.0.183 146 12/21/2025
4.0.182 104 12/20/2025
4.0.181 124 12/20/2025
4.0.180 151 12/20/2025
4.0.179 154 12/20/2025
4.0.178 238 12/19/2025
4.0.177 245 12/19/2025
4.0.176 265 12/18/2025
4.0.175 265 12/18/2025
4.0.174 262 12/18/2025
4.0.173 264 12/18/2025
4.0.172 267 12/16/2025
4.0.171 257 12/16/2025
4.0.170 260 12/16/2025
4.0.169 261 12/16/2025
4.0.168 247 12/15/2025
4.0.167 245 12/15/2025
4.0.166 101 12/13/2025
4.0.165 112 12/13/2025
4.0.164 412 12/11/2025
4.0.163 414 12/11/2025
4.0.162 421 12/9/2025
4.0.161 436 12/9/2025
4.0.160 223 11/22/2025
4.0.159 294 11/21/2025
4.0.158 303 11/21/2025
4.0.157 309 11/21/2025
4.0.156 353 11/21/2025
4.0.155 378 11/21/2025
4.0.154 393 11/20/2025
4.0.153 278 11/17/2025
4.0.152 279 11/12/2025
4.0.151 281 11/12/2025
4.0.150 275 11/12/2025
4.0.149 286 11/11/2025
4.0.148 278 11/11/2025
4.0.147 278 11/11/2025
4.0.146 262 11/10/2025
4.0.145 255 11/10/2025
4.0.144 257 11/10/2025
4.0.143 243 11/10/2025
4.0.142 205 11/9/2025
4.0.141 128 11/7/2025
4.0.140 139 11/7/2025
4.0.139 187 11/7/2025
4.0.138 198 11/6/2025
4.0.137 192 11/5/2025
4.0.136 195 11/5/2025
4.0.135 187 11/4/2025
4.0.134 190 11/4/2025
4.0.133 199 11/4/2025
4.0.132 189 11/2/2025
4.0.131 154 10/31/2025
4.0.130 186 10/31/2025
4.0.129 187 10/30/2025
4.0.128 191 10/29/2025
3.0.127 199 10/29/2025
3.0.126 176 10/27/2025
3.0.125 120 10/24/2025
3.0.124 142 10/24/2025
3.0.123 170 10/22/2025
3.0.122 161 10/17/2025
3.0.121 165 10/17/2025
3.0.120 175 10/16/2025
3.0.119 171 10/15/2025
3.0.118 173 10/15/2025
3.0.117 172 10/15/2025
3.0.116 170 10/8/2025
3.0.115 184 10/8/2025
3.0.114 174 10/8/2025
3.0.113 186 10/5/2025
3.0.112 171 10/5/2025
3.0.111 107 10/4/2025
3.0.110 180 10/2/2025
3.0.109 178 10/1/2025
3.0.108 173 9/30/2025
3.0.107 126 9/27/2025
3.0.106 103 9/27/2025
3.0.105 203 9/22/2025
3.0.104 168 9/21/2025
3.0.103 214 9/20/2025
3.0.102 257 9/19/2025
3.0.101 318 9/19/2025
3.0.100 301 9/18/2025
3.0.99 309 9/17/2025
3.0.98 307 9/17/2025
3.0.97 311 9/17/2025
3.0.96 306 9/17/2025
3.0.95 300 9/17/2025
3.0.94 297 9/17/2025
3.0.93 308 9/17/2025
3.0.92 304 9/16/2025
3.0.91 294 9/16/2025
3.0.90 147 9/13/2025
3.0.89 180 9/11/2025
3.0.88 173 9/10/2025
3.0.87 164 9/10/2025
3.0.86 174 9/10/2025
3.0.85 168 9/10/2025
3.0.84 165 9/9/2025
3.0.83 172 9/9/2025
3.0.82 178 9/7/2025
3.0.81 138 9/7/2025
3.0.80 138 9/7/2025
3.0.79 140 9/6/2025
3.0.78 142 9/6/2025
3.0.77 117 9/5/2025
3.0.76 130 9/5/2025
3.0.75 187 9/4/2025
3.0.74 184 9/4/2025
3.0.73 196 9/4/2025
3.0.72 177 9/4/2025
3.0.71 176 9/4/2025
3.0.70 183 9/4/2025
3.0.69 185 9/4/2025
3.0.68 194 9/3/2025
3.0.67 100 8/23/2025
3.0.66 80 8/23/2025
3.0.65 75 8/23/2025
3.0.64 85 8/22/2025
3.0.63 138 8/17/2025
3.0.62 136 8/17/2025
3.0.61 149 8/15/2025
3.0.60 152 8/15/2025
3.0.59 152 8/15/2025
3.0.58 165 8/14/2025
3.0.57 168 8/14/2025
3.0.56 166 8/13/2025
3.0.55 173 8/13/2025
3.0.54 170 8/12/2025
3.0.53 166 8/12/2025
3.0.52 171 8/12/2025
3.0.51 172 8/12/2025
3.0.50 164 8/12/2025
3.0.49 169 8/11/2025
3.0.48 169 8/11/2025
3.0.47 169 8/11/2025
3.0.46 168 8/11/2025
3.0.45 169 8/11/2025
3.0.44 174 8/11/2025
3.0.43 240 8/7/2025
3.0.42 239 8/7/2025
3.0.41 263 8/5/2025
3.0.40 256 8/5/2025
3.0.39 256 8/5/2025
3.0.38 265 8/5/2025
3.0.37 250 8/5/2025
3.0.36 154 7/30/2025
3.0.35 164 7/30/2025
3.0.34 147 7/29/2025
3.0.33 498 7/24/2025
3.0.32 502 7/24/2025
3.0.31 189 7/9/2025
3.0.30 182 7/9/2025
3.0.29 182 7/9/2025
3.0.28 117 7/4/2025
3.0.27 182 7/3/2025
3.0.26 188 7/3/2025
3.0.25 188 7/2/2025
3.0.24 170 7/2/2025
3.0.23 179 7/1/2025
3.0.22 138 6/28/2025
3.0.21 139 6/28/2025
3.0.20 146 6/28/2025
3.0.19 95 6/28/2025
3.0.18 201 6/25/2025
3.0.17 181 6/25/2025
3.0.16 180 6/25/2025
3.0.15 343 6/12/2025
3.0.14 335 6/12/2025
3.0.13 320 6/12/2025
3.0.12 334 6/11/2025
3.0.11 330 6/11/2025
3.0.10 326 6/11/2025
3.0.9 332 6/10/2025
3.0.8 185 6/3/2025
3.0.7 188 6/3/2025
3.0.6 184 6/3/2025
3.0.5 181 6/3/2025
3.0.4 187 5/28/2025
3.0.3 189 5/28/2025
3.0.2 191 5/28/2025
3.0.1 190 5/28/2025