I have a blazor server project and I need to send an excel file with data to create objects of an entity. I have searched a lot and have not found anything that has worked for me. I believe my problem is accessing the file to then be able to do what I want.
In my blazor component i have:
<InputFile OnChange="@ImportExcelFile" accept=".xlsx" multiple="false"></InputFile>@code { async Task ImportExcelFile(InputFileChangeEventArgs e) { await EnrollmentService.CreateEnrollmentByExcel(e); }}In my EnrollmentService.cs i need to read file.
If anyone can help me I would be very grateful.