I am getting the "Cannot access a closed Stream" when I am trying to save a ClosedXML Workbook (XLWorkbook) to a memory stream.
public byte[] GetStream()
{
using (var stream = new MemoryStream())
{
Workbook.SaveAs(stream);
return stream.ToArray();
}
}
As far as I can understand there is a problem within the ClosedXml library since the stream has been created just before accessing the save method.