We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot open excel file

Thread ID:





104151 Jun 25,2012 11:29 PM UTC Oct 31,2012 10:32 AM UTC WinForms 6
Tags: XlsIO
Asked On June 25, 2012 11:29 PM UTC

Like below, I faced the exception.
--Code here
IWorkbook workbook = excelEngine.Excel.Workbooks.Open(stream, ExcelOpenType.Automatic);
The type initializer for 'Syncfusion.Compression.Zip.ZipCrc32' threw an exception.
I referenced
for partial-trust and also same as full-trust.
Thank you.

Mahajothi R [Syncfusion]
Replied On June 26, 2012 05:41 AM UTC

Hi Jiwon,


Thank you for your interest in Syncfusion product.


We are not able to reproduce the issue at our side. We have created the sample and tried to reproduce the issue. Could you please modify the posted sample to reproduce the issue and revert us back the same, which helps us to further investigation on this.


Sample : OpenExcelFile.zip


We have used the following assemblies with the version






Could you please update us with your input template and the version of our Syncfusion product.


Please let us know if you need any clarifications.




Mahajothi R.

Replied On July 3, 2012 05:26 AM UTC

I faced that problem in another platform, Winform.
I uploaded test solution, and include Winform project.
If you just debug, you can see the exception as I told you.
One more curious thing is deployment.



Syncfusion.XlsIO.Base.dll              should be included.

When I refered to those, my test solution is not accepted.

Your reply was for ASP.NET, I want you to make sure.


Thank you.



Replied On July 3, 2012 06:02 AM UTC

My team member's computer is working as same chord.
One more thing for your help, I attach inner exception.
   at Syncfusion.Compression.Zip.ZipCrc32.ComputeCrc(Byte[] buffer, Int32 offset, Int32 length, UInt32 startCrc)
   at Syncfusion.Compression.Zip.ZipArchiveItem.CheckCrc(Byte[] arrData)
   at Syncfusion.Compression.Zip.ZipArchiveItem.DecompressDataOrdinary()
   at Syncfusion.Compression.Zip.ZipArchiveItem.DecompressData()
   at Syncfusion.Compression.Zip.ZipArchiveItem.get_DataStream()
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseContentType()
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(List`1& themeColors)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseExcel2007Stream(Stream stream, String password)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelOpenType openType, String fileName, ExcelVersion version, ExcelParseOptions

Mahajothi R [Syncfusion]
Replied On July 4, 2012 06:33 AM UTC

Hi Jiwan,


Thank you for updating us with test solution. We have executed the updated test sample with our custom input template (.xlsx) file, we are not able to reproduce the issue. The reported exception may occur when trying to open the corrupted input excel file so could you please update us with your input template which will helps us to further investigate on this.



Your test sample (SRTestWinForm) created with the target version of .NET Framework Client Profile so it do not accept “Syncfusion.XlsIO.Base.dll” assembly. To add “Syncfusion.XlsIO.Base.dll” assembly need to change the project Target Framework.


Please let us know if you require any further clarifications.



Mahajothi R.

Replied On October 30, 2012 12:19 PM UTC

Hi Mahajothi,

The sample code shared works perfectly to open .xlsx file.

But when in the same code, if I replace it to open my .xlsx, it fails to open. 

//create object for excel engine

ExcelEngine excelEngine = new ExcelEngine();

//Read input file

//Stream strm = File.OpenRead(@"C:\Users\bmandv1\Exprt\JIRA-3163-CSVtoExcel\OpenExcelFile1960395822\OpenExcelFile\InputFile\NorthwindTemplate.xlsx");

Stream strm = File.OpenRead(@"C:\Users\bmandv1\ExcelTemplate.xlsx");

//open excel workbook

IWorkbook book = excelEngine.Excel.Workbooks.Open(strm, ExcelOpenType.Automatic);

//close the workbook object



can you kindly help me with what is the issue with my .xlsx, not allowing to open.

I've attached my .xlsx file for your refernce.





Mahajothi R [Syncfusion]
Replied On October 31, 2012 10:32 AM UTC

Hi Jiwon,

Thank you for updating us with input template. The issue mentioned here is suspected to be a defect. Please create a new incident regarding the issue mentioned in Forum 104151 so that we can proceed further on this.


Please let us know if you require any further clarifications.





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon