ClosedXML OutofMemoryException更多logging
我使用ClosedXML将数据导出到Excel中。 代码如下
var workbook = new XLWorkbook(); var ws = workbook.Worksheets.Add(table, tabName); using (MemoryStream memoryStream = new MemoryStream()) { workBook.SaveAs(memoryStream); memoryStream.WriteTo(Response.OutputStream); memoryStream.Close(); }
如果我正在导出22000+条logging,我在这行workBook.SaveAs(memoryStream);
得到了OutofMemoryException workBook.SaveAs(memoryStream);
请给我一个解决scheme。