How Do I Upload xls sheet Read it and save it into database in Blazor WASM

Prathamesh Shende 376 Reputation points

I saw so many examples about bulk upload from excel sheet into database. But the problem is all videos and tutorials are in Blazor Server. So many ready example also available on youtube.
I want develop this blazor wasm and also have core web api hosted with it . So how do I implement it ? any example please or tutorial.

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,450 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 59,046 Reputation points

    for Blazor WASM its a standard file upload (<input file>) to the core webapi. You should be able to find lots of core examples.

    if you meant to parse the xls sheet in blazor then you need an excel parser that runs in blazor. find a .netstandard 2.0 library version that supports memory streams to read the excel file. if you can not find one, there are javascript ones you could use.

    note: with WASM blazor you need to careful of the file sizes

    0 comments No comments