I use EPPlus for work with Excel. I save data with pictures (qty 1635). When saving, it throw exception "Error saving file". In InnerException there is "An exception of type" System.OutOfMemoryException"". that StackTrace
in System.IO.MemoryStream.set_Capacity(Int32 value)
in System.IO.MemoryStream.EnsureCapacity(Int32 value)
in System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in OfficeOpenXml.Packaging.Ionic.Zip.CountingStream.Write(Byte[] buffer, Int32 offset, Int32 count) в d:\EPPlus\Packaging\DotNetZip\Shared.cs:line 813
in OfficeOpenXml.Packaging.Ionic.Zlib.ZlibBaseStream.Write(Byte[] buffer, Int32 offset, Int32 count) in d:\EPPlus\Packaging\DotNetZip\Zlib\ZlibBaseStream.cs:line 160
in OfficeOpenXml.Packaging.Ionic.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count) в d:\EPPlus\Packaging\DotNetZip\Zlib\DeflateStream.cs:line 617
in OfficeOpenXml.Packaging.Ionic.Crc.CrcCalculatorStream.Write(Byte[] buffer, Int32 offset, Int32 count) в d:\EPPlus\Packaging\DotNetZip\CRC32.cs:line 710
in OfficeOpenXml.Packaging.Ionic.Zip.ZipOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count) в d:\EPPlus\Packaging\DotNetZip\ZipOutputStream.cs:line 1290
in OfficeOpenXml.Packaging.ZipPackagePart.WriteZip(ZipOutputStream os) в d:\EPPlus\Packaging\ZipPackagePart.cs:line 149
RAM = 8gb. Max size picture is 200kb, average size ~70kb
in line in OfficeOpenXml.Packaging.Ionic.Zip.CountingStream.Write(Byte[] buffer, Int32 offset, Int32 count) в d:\EPPlus\Packaging\DotNetZip\Shared.cs:line 813
values are 8096, 0, 8096. MemoryStream.Length = 161412349
How can I solve this problem?