I have created an excel file using NPOI and would like to send this through an API to make it downloadable from that webpage.
My question is that how do I in a good way send this excel file through my API? Can I store this excel file as a Blob or binary instead without saving it as a file to make it more easy to send it?(Don't want to save a file every time I am exporting an excel document)
using (var fileData = new FileStream("ReportName.xls", FileMode.Create))
{
workbook.Write(fileData);
}
This is what I am using now to save the file.