Importing XLSX file in Blazor Web Assembly for .NET 5.0 is very slow.
<InputFile OnChange="@HandleFileSelected" />
async Task HandleFileSelected(InputFileChangeEventArgs e)
{
var ms = new MemoryStream((int)e.File.Size);
Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();
using (Stream ey = e.File.OpenReadStream(e.File.Size))
{
await ey.CopyToAsync(ms,(int)e.File.Size);
ey.Close();
}
oWorkbook = formatProvider.Import(ms);
}