How to process an iFormFile with ClosedXML with c#
Asked Answered
J

1

5

I want to load an excel file into XLWorkbook

using var workbook = new XLWorkbook("iFormFile needs to go here");
var ws = workbook.Worksheet(1);
Jeopardy answered 18/3, 2022 at 6:46 Comment(0)
R
6

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

using var workbook = new XLWorkbook(iFormFile.OpenReadStream());
var ws = workbook.Worksheet(1);
Reamer answered 18/3, 2022 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.