I am trying to import the contents from the Excel file to datatable and export some modified contents again to the Excel Spreadsheet?
I have tried almost all means, IExcelDataReader not found, no packages compatible for .net core App
Gembox.Spreadsheet, Microsoft.Office.Interop.Excel etc
Is there any way to achieve it?
I have got the excel file Filestream fs, how to copy the contents to a datatable?
Similarly, how to write the contents of datatable to Excel file in filestream?
My Function Code
string FilePath;
using (FileStream filestream = new FileStream(Path.Combine(uploads, file.FileName), FileMode.Create))
{
await file.CopyToAsync(filestream);
FilePath = ""+ _environment.WebRootPath + "Uploads" + file.FileName;
}
using (FileStream FS = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.None))
{
//IExcelDataReader excelReader;
DataTable DT;
}