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.
Unfortunately, activation email could not send to your email. Please try again.

"File does not contains workbook stream" Error message

Thread ID:

Created:

Updated:

Platform:

Replies:

34925 Sep 19,2005 07:00 PM Jan 16,2018 08:19 AM Windows Forms 7
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On September 19, 2005 07:00 PM

Hello Trying to open an excel file (generated by Crystal Reports) and getting this error "File does not contains workbook stream" Your example from "http://www.syncfusion.com/support/issues/includes/attachments/552_Copying Worksheet To Another Workbook.zip" with your test Excel files works fine. Could you help me with this issue plase. Thanks! -- Ilya //this fails IWorkbook wb_src = ExcelUtils.Open(srcFileName); //this fails too ExcelEngine excelEngine = new ExcelEngine(); IApplication application = excelEngine.Excel; IWorkbook wb_src = excelEngine.Excel.Workbooks.Open(srcFileName); ================================================= Error Message: System.ApplicationException: File does not contains workbook stream at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, ExcelParseOptions options) at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName) at Syncfusion.ExcelRW.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) at Syncfusion.ExcelRW.Implementation.Collections.WorkbooksCollection.Open(String Filename) at ExcelMergeRW.Class1.Test2() in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 66 at ExcelMergeRW.Class1.Main(String[] args) in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 94 An unhandled exception of type ''Syncfusion.ExcelRW.ExcelWorkbookNotSavedException'' occurred in syncfusion.excelrw.base.dll 01_422.zip

Administrator [Syncfusion]
Replied On September 20, 2005 12:58 AM

>Hello > >Trying to open an excel file (generated by Crystal Reports) and getting this error "File does not contains workbook stream" > >Your example from "http://www.syncfusion.com/support/issues/includes/attachments/552_Copying Worksheet To Another Workbook.zip" with your test Excel files works fine. > >Could you help me with this issue plase. > >Thanks! > >-- Ilya > >//this fails >IWorkbook wb_src = ExcelUtils.Open(srcFileName); > >//this fails too >ExcelEngine excelEngine = new ExcelEngine(); >IApplication application = excelEngine.Excel; >IWorkbook wb_src = excelEngine.Excel.Workbooks.Open(srcFileName); > > >================================================= >Error Message: >System.ApplicationException: File does not contains workbook stream > at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, ExcelParseOptions options) > at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName) > at Syncfusion.ExcelRW.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) > at Syncfusion.ExcelRW.Implementation.Collections.WorkbooksCollection.Open(String Filename) > at ExcelMergeRW.Class1.Test2() in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 66 > at ExcelMergeRW.Class1.Main(String[] args) in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 94 >An unhandled exception of type ''Syncfusion.ExcelRW.ExcelWorkbookNotSavedException'' occurred in syncfusion.excelrw.base.dll > > > >01_422.zip > > Try this code: using(ExcelEngine engine = new ExcelEngine()) { engine.ThrowNotSavedOnDestroy = false; IApplication application = engine.Excel; IWorkbook wb = application.Workbooks.Open(srcFileName); // enjoy the work wb.Close(); } // RTFM ;)

Administrator [Syncfusion]
Replied On September 20, 2005 08:33 AM

Hi Ilya, It works fine for me. I herewith attach a Sample using your file, see to it and please let me know if you have further questions. OpeningASpreadsheet_9764.zip Best Regards, Seetha >Hello > >Trying to open an excel file (generated by Crystal Reports) and getting this error "File does not contains workbook stream" > >Your example from "http://www.syncfusion.com/support/issues/includes/attachments/552_Copying Worksheet To Another Workbook.zip" with your test Excel files works fine. > >Could you help me with this issue plase. > >Thanks! > >-- Ilya > >//this fails >IWorkbook wb_src = ExcelUtils.Open(srcFileName); > >//this fails too >ExcelEngine excelEngine = new ExcelEngine(); >IApplication application = excelEngine.Excel; >IWorkbook wb_src = excelEngine.Excel.Workbooks.Open(srcFileName); > > >================================================= >Error Message: >System.ApplicationException: File does not contains workbook stream > at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, ExcelParseOptions options) > at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName) > at Syncfusion.ExcelRW.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) > at Syncfusion.ExcelRW.Implementation.Collections.WorkbooksCollection.Open(String Filename) > at ExcelMergeRW.Class1.Test2() in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 66 > at ExcelMergeRW.Class1.Main(String[] args) in c:\projects\excelmergeprojects\excelmergerw\class1.cs:line 94 >An unhandled exception of type ''Syncfusion.ExcelRW.ExcelWorkbookNotSavedException'' occurred in syncfusion.excelrw.base.dll > > > >01_422.zip > >

Administrator [Syncfusion]
Replied On September 20, 2005 11:31 AM

Hi Seetha Thanks for looking into this. Yes, I do see that it works fine. I did not submit the original 01.xls, but the one I alterated by changing all the actual data to the strings like "aaa", "bbb" ... The original 01.xls is an Excel file generated by Crystal Reports and that file caused the problem. So the file you saw was created by Excel, the problem file was generated by Crystal Reports. Have you had any issues with Crystal Reports generated Excel files? Thanks -- Ilya >Hi Ilya, > >It works fine for me. I herewith attach a Sample using your file, see to it and please let me know if you have further questions. > >OpeningASpreadsheet_9764.zip > >Best Regards, >Seetha >

Administrator [Syncfusion]
Replied On September 21, 2005 08:10 AM

Hi Ilya, 1) Since the file was produced by a vendor other than Microsoft it is likely that the implementation for creating Native Excel files has a bug. This is mainly because the BIFF8 file format information published by Microsoft is incomplete and a lot of records are undocumented so the developers have to rely on trial and error to find out the undocumented Biff record structures. However, this process can be error prone and it causes imperfect BIFF8 files to be produced. The reason why Microsoft Excel is able to view these damaged files is that MS Excel has a lot more information about the file format, so it is able to guess wrong records and repair them when necessary. 2) we have not tested compatibility of XlsIO with spreadsheets produced by Crystal Reports. However, we do have plans to make XlsIO more robust in handling imperfect files but it would be atlease 8+ weeks before we can provide an updated build that handles Crystal reports files better. 3) Till that time, please create a Direc-Trac incident with the specific files that you are having problems with and we wil try to fix them as soon as possible. Thanks, Stephen. >Hi Seetha >Thanks for looking into this. >Yes, I do see that it works fine. > >I did not submit the original 01.xls, but the one I alterated by changing all the actual data to the strings like "aaa", "bbb" ... > >The original 01.xls is an Excel file generated by Crystal Reports and that file caused the problem. > >So the file you saw was created by Excel, the problem file was generated by Crystal Reports. > >Have you had any issues with Crystal Reports generated Excel files? > >Thanks > >-- Ilya > > > >>Hi Ilya, >> >>It works fine for me. I herewith attach a Sample using your file, see to it and please let me know if you have further questions. >> >>OpeningASpreadsheet_9764.zip >> >>Best Regards, >>Seetha >> >

Administrator [Syncfusion]
Replied On September 21, 2005 09:59 AM

Hello Stephen, thank you for a very detailed answer. I may submit that Crystal-generated (corrupted) Excel file though Direc-Trac so you may tweak your classes correspondingly. Best regards, -- Ilya >Hi Ilya, > >1) Since the file was produced by a vendor other than Microsoft it is likely that the implementation for creating Native Excel files has a bug. This is mainly because the BIFF8 file format information published by Microsoft is incomplete and a lot of records are undocumented so the developers have to rely on trial and error to find out the undocumented Biff record structures. However, this process can be error prone and it causes imperfect BIFF8 files to be produced. The reason why Microsoft Excel is able to view these damaged files is that MS Excel has a lot more information about the file format, so it is able to guess wrong records and repair them when necessary. > >2) we have not tested compatibility of XlsIO with spreadsheets produced by Crystal Reports. However, we do have plans to make XlsIO more robust in handling imperfect files but it would be atlease 8+ weeks before we can provide an updated build that handles Crystal reports files better. > >3) Till that time, please create a Direc-Trac incident with the specific files that you are having problems with and we wil try to fix them as soon as possible. > >Thanks, > >Stephen.

Sailaja
Replied On January 16, 2018 01:52 AM

I am unable to open attached file. password: january. I used IWorkbook Open(string strFileName, ExcelParseOptions options, bool bReadOnly, string password);
Exeception:
  at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStgStream(ICompoundStorage storage, ExcelParseOptions options, 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, Boolean bReadOnly, String password, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelParseOptions options, Boolean bReadOnly, String password, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelParseOptions options, Boolean isReadOnly, String password, ExcelVersion excelVersion)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelParseOptions options, Boolean isReadOnly, String password)
Attachment: Master_Approvals_List_5aec4f27.zip

Abirami Varadharajan [Syncfusion]
Replied On January 16, 2018 08:19 AM

Hi Sailaja, 

Thank you for contacting Syncfusion support. 

We are able to reproduce the issue. The issue occurs while trying to parse XLSX file as binary file format. This is because, the application default version is not set while opening the file as stream. It is recommended to set the application version as Excel2007 or above before opening a file stream to resolve the issue. Please refer below code for the same. 

application.DefaultVersion = ExcelVersion.Excel2013; 

Kindly try and let us know that the issue is resolved at your end. 

Regards, 
Abirami. 


CONFIRMATION

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.

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.

;