I have a program that uses ZLIB 1.2.8 to zip the XML files into an Excel file.
Excel reads the file fine, and WinZip handles it OK too, but OpenXML comes up with an error:
Server Error in ‘/’ Application.
The specified package is invalid. The main part is missing.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: DocumentFormat.OpenXml.Packaging.OpenXmlPackageException: The specified package is invalid. The main part is missing.
Source Error:
Line 38: using (ClosedXML.Excel.XLWorkbook workBook = new ClosedXML.Excel.XLWorkbook(path))
The content is OK as when I unzip the contents and re-zip it with WinZip it reads fine into OpenXML. I conclude there must a problem in OpenXML in reading the zip created by ZLIB 1.2.8. The ZLIB library (http://zlib.net/) widely used, so I’m not sure what the incompatibility is.
Any pointers to a solution or where to post this bug would be helpful.
Thanks,
David.