CONTEXT:
All I want to do is:
- My ASP.Net web controller calls a function that generates an .xlsx spreadsheet from scratch.
- The function uses OpenXML PowerTools (because that seems the most straightforward way to include a Pivot Table in the .xlsx)
- Once the function returns, the controller needs to return the .xlsx back to the web client as an Asp.Net Core FileStream object.
In other words, all I want to do is go from 2 (working) to 3 (that’s where I’m stuck). I can’t seem to “convert” the successfully created spreadsheet into a MVC FileStream-compatible object for the controller to pass back to the caller.