Skip to content

Exception #2349

@SimonCoghlan

Description

@SimonCoghlan

EPPlus usage

Commercial use (I have a commercial license)

Environment

Windows - service
32 Cores
128GB of Mem
NVMe drives

Epplus version

7.2.0 (But it also happens in the latest 8.5.4)

Spreadsheet application

Excel 365

Description

When opening a large XLSX file which has a single sheet of 2.6GB (Might not be the case due to this..)
I get the following exception when trying to assign the workbook (Nothing else has happened since the open!)
i.e. the last line of the following in a .Net8 application:

        #region hack to bypass https://github.com/EPPlusSoftware/EPPlus/issues/2120
        await Task.Run(async () => await _ep.LoadAsync(filePath, ct).ConfigureAwait(false),
                ct)
            .ConfigureAwait(false);
        ct.ThrowIfCancellationRequested();
        #endregion
        _wb = _ep.Workbook;

For 7.2.0:

   at Microsoft.IO.RecyclableMemoryStream.ThrowDisposedException()
   at Microsoft.IO.RecyclableMemoryStream.Seek(Int64 offset, SeekOrigin loc)
   at OfficeOpenXml.Packaging.Ionic.Zip.ZipInputStream.Seek(Int64 offset, SeekOrigin origin)
   at OfficeOpenXml.Packaging.Ionic.Zip.ZipInputStream.set_Position(Int64 value)
   at OfficeOpenXml.ExcelWorksheet.MoveEntry(ZipInputStream zip, ZipEntry entry)
   at OfficeOpenXml.ExcelWorksheet.CreateXml()
   at OfficeOpenXml.ExcelWorksheet..ctor(XmlNamespaceManager ns, ExcelPackage excelPackage, String relID, Uri uriWorksheet, String sheetName, Int32 sheetID, Int32 positionID, Nullable`1 hide)
   at OfficeOpenXml.ExcelWorksheets..ctor(ExcelPackage pck, XmlNamespaceManager nsm, XmlNode topNode)
   at OfficeOpenXml.ExcelWorkbook.get_Worksheets()
   at OfficeOpenXml.ExcelWorkbook.GetDefinedNames()
   at OfficeOpenXml.ExcelPackage.get_Workbook()

For 8.5.4:

   at System.ThrowHelper.ThrowObjectDisposedException_StreamClosed(String objectName)
   at System.IO.MemoryStream.Seek(Int64 offset, SeekOrigin loc)
   at OfficeOpenXml.Packaging.Ionic.Zip.ZipInputStream.Seek(Int64 offset, SeekOrigin origin)
   at OfficeOpenXml.Packaging.Ionic.Zip.ZipInputStream.set_Position(Int64 value)
   at OfficeOpenXml.ExcelWorksheet.MoveEntry(ZipInputStream zip, ZipEntry entry)
   at OfficeOpenXml.ExcelWorksheet.CreateXml()
   at OfficeOpenXml.ExcelWorksheet..ctor(XmlNamespaceManager ns, ExcelPackage excelPackage, String relID, Uri uriWorksheet, String sheetName, Int32 sheetID, Int32 positionID, Nullable`1 hide)
   at OfficeOpenXml.ExcelWorksheets..ctor(ExcelPackage pck, XmlNamespaceManager nsm, XmlNode topNode)
   at OfficeOpenXml.ExcelWorkbook.get_Worksheets()
   at OfficeOpenXml.ExcelWorkbook.GetDefinedNames()
   at OfficeOpenXml.ExcelPackage.get_Workbook()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions