Soenneker.Blazor.SheetMapper 11.0.710

Prefix Reserved
dotnet add package Soenneker.Blazor.SheetMapper --version 11.0.710
                    
NuGet\Install-Package Soenneker.Blazor.SheetMapper -Version 11.0.710
                    
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="11.0.710" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.SheetMapper" Version="11.0.710" />
                    
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 11.0.710
                    
#r "nuget: Soenneker.Blazor.SheetMapper, 11.0.710"
                    
#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@11.0.710
                    
#: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=11.0.710
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.SheetMapper&version=11.0.710
                    
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 alternate text is missing from this package README image

Soenneker.Blazor.SheetMapper

A Blazor upload-and-selection component for matching CSV or tab-delimited column headers to writable properties on a C# type.

SheetMapper example

Live demo

SheetMapper produces a property-to-header dictionary. It does not parse data rows, convert cell values, validate a complete mapping, or create model instances.

Installation

dotnet add package Soenneker.Blazor.SheetMapper

Register SheetMapper and its FilePond and Tom Select dependencies in Program.cs:

using Soenneker.Blazor.SheetMapper.Registrars;

builder.Services.AddSheetMapperAsScoped();

Add the component namespace to _Imports.razor:

@using Soenneker.Blazor.SheetMapper

Usage

@page "/employees/import"

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

<button type="button" @onclick="UseMapping">Continue</button>

@code {
    private SheetMapper? _mapper;

    private void UseMapping()
    {
        Dictionary<string, string> mapping = _mapper!.GetCurrentMap();

        // Example:
        // mapping["FirstName"] == "First Name"
        // mapping["Department"] == "" when no column was selected
    }
}

TargetType is required. The component creates one selector for each public, writable, non-indexer property. Uploading a new file replaces the current headers and mapping.

Mapping behavior

When AutomaticallyMap is enabled—or when AutoMap() is called—the mapper compares each property name with the uploaded headers:

  • comparison is case-insensitive;
  • spaces are removed from headers before the second comparison;
  • punctuation, underscores, aliases, and data annotations are not normalized;
  • multiple properties may select the same header.

Duplicate selections are marked in the UI but are not rejected. Validate the dictionary before using it if every property must map to a unique column.

GetCurrentMap() returns property names as keys and selected source headers as values. Unmapped properties have an empty-string value.

Parameters

Parameter Default Purpose
TargetType — Type whose public writable properties are displayed.
AutomaticallyMap false Runs the built-in name-matching heuristic after an upload.
ShowStatusIcons true Shows mapped, unmapped, and duplicate indicators.
NotMappedIcon ⚠️ Markup used for an unmapped property.
DuplicatedIcon 🔁 Markup used when a header is selected more than once.
MappedIcon ✅ Markup used for a unique selection.

The rendered markup uses Bootstrap-style classes such as input-group, input-group-text, and form-control. Include compatible host styles or override those classes in your application. Package CSS is loaded automatically when the component becomes interactive.

Upload considerations

  • The upload is read in the browser interop path and is limited by FilePond's configured maximum stream size; the default configuration used here limits the stream to 2 MB.
  • File content is used only to discover headers. Your application remains responsible for validating the file, parsing rows, converting values, and enforcing import limits before persistence.
  • Spreadsheet formats such as .xlsx are not supported. Export them as CSV or tab-delimited text first.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
11.0.710 116 11/4/2026
11.0.709 80 11/4/2026
11.0.708 81 11/3/2026
11.0.707 78 11/3/2026
11.0.706 76 11/3/2026
11.0.705 79 11/3/2026
11.0.704 82 11/3/2026
11.0.703 81 11/3/2026
11.0.702 76 11/3/2026
11.0.701 80 11/3/2026
11.0.700 87 11/3/2026
11.0.699 81 11/3/2026
11.0.697 84 11/3/2026
11.0.695 95 11/2/2026
11.0.694 93 11/2/2026
11.0.693 94 11/2/2026
11.0.692 97 11/2/2026
11.0.691 115 10/29/2026
11.0.690 93 10/29/2026
11.0.689 92 10/29/2026
Loading failed

Update dependency Soenneker.Blazor.FilePond to 11.0.4076 (#1531)

Automatically merged