EPPlus Large Dataset Issue with Out of Memory Exception

前端 未结 5 2043
失恋的感觉
失恋的感觉 2020-11-29 09:07

System Out of Memory Exception. I see the memory Stream is only flushed when saved. We have 1.5 - 2GB Datasets.

I am using EPPlus Version 3.1.3.0

We do the

5条回答
  •  暖寄归人
    2020-11-29 09:17

    @Ernie is correct about some of the limitations of the current version of EPPlus. They've acknowledged that, and have been working on fixing it. This leaves you with one of two possible options for getting this to work:

    1) Switch to the EPPlus 4.0 Beta, where they've fixed this issue, along with some other things as well (although you'll be using a beta version).

    2) The ExcelPackage and ExcelWorksheet classes both implement IDisposable, so you might start getting better performance if you were to wrap your usage of them in a using() statement.

提交回复
热议问题