How to process an iFormFile with ClosedXML with c#

Viewed 635

I want to load an excel file into XLWorkbook

using var workbook = new XLWorkbook("iFormFile needs to go here");
var ws = workbook.Worksheet(1);
1 Answers

There can be better answers than this, but this should work.

using var workbook = new XLWorkbook(iFormFile.OpenReadStream());
var ws = workbook.Worksheet(1);
Related