Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Loading xlsm file throws an exception "header signature could not be found"

Viewing 1 post (of 1 total)
  • Author
    Posts
  • DorShaar
    Participant
    Post count: 2
    #50611 |

    Xceed hello,

    (DS-40032)
    I have xlsm file which I try to load with the next code:

    public void LoadArchive(string filePath)
    {
    using (FileStream zipFileStream = File.OpenRead(filePath))
    {
    StreamFile streamFile = new StreamFile(zipFileStream);
    ZipArchive archive = ZipArchive(streamFile); // Throws an exception.
    }
    }

    I get the next exception:
    Xceed.Zip.InvalidZipStructureException: The zip end header signature could not be found in the zip file.
    Zip file: SFF29197693:\SF20847591
    at Xceed.Zip.ZipHandler.ReadEndHeader(BinaryReader reader, Stream stream, ISpannedStream spannedStream)
    at Xceed.Zip.ZipStorage.DoReadItems(FileSystemEventsSession session, ReadItemsSession readItemsSession, Stream source, ISpannedStream spannedStream)
    at Xceed.Utils.Storage.Storage.ReadItems(FileSystemEventsSession session, Stream source)
    at Xceed.Utils.Storage.StorageHandler.Refresh(FileSystemEventsSession session, Boolean forceRefresh)
    at Xceed.Zip.ZipHandler.GetZipHandler(FileSystemEventsSession session, AbstractFile zipFile)
    at Xceed.Zip.ZippedFolder..ctor(FileSystemEvents events, Object userData, AbstractFile zipFile, String folderName)
    at Xceed.Zip.ZipArchive..ctor(FileSystemEvents events, Object userData, AbstractFile zipFile)

    I would like to know if my file is corrupted or it has to do with the dll version I am using: 4.9.15601.10520
    P.S: Is there a way to upload here / share with you somehow the file?

    Thank you,

    Dor.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.