Using EPPlus with a MemoryStream

后端 未结 8 1111
离开以前
离开以前 2020-12-05 06:05

I am using EPPlus to generate an XLSX file in C#. As soon as I instantiate the ExcelPackage with a memory stream - I get the error:

\"A disk error occ

相关标签:
8条回答
  • 2020-12-05 06:56

    You can create an ExcelPackage with an empty constructor. It will handle its own internal buffer.

    http://epplus.codeplex.com/wikipage?title=WebapplicationExample

    0 讨论(0)
  • 2020-12-05 07:06

    If you want to continue using a stream (e.g. Response.OutputStream) you can create an ExcelPackage with an empty constructor and use the SaveAs(Stream OutputStream) method.

    0 讨论(0)
提交回复
热议问题