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.

Cannot create a compound file

Thread ID:

Created:

Updated:

Platform:

Replies:

70175 Nov 29,2007 05:51 PM Dec 3,2007 01:20 AM ASP.NET Web Forms (Classic) 2
loading
Tags: XlsIO
Emperor
Asked On November 29, 2007 05:51 PM

I open a template excel file, add some data to it and save the file. I get "cannot create compound file" error.

Here's the code:

protected IWorkbook _Book;
ExcelEngine excelEngine = new ExcelEngine();
excelEngine.ThrowNotSavedOnDestroy = false;
IApplication excel = excelEngine.Excel;
excel.SheetsInNewWorkbook = 5;
_Book = excel.Workbooks.Open("Template Dir/Filename");

string filePath = "Some file path";
_Book.SaveAs(filePath+_FileName, ExcelSaveType.SaveAsXLS);
_Book.Close();
excelEngine.Dispose();


Emperor
Replied On November 30, 2007 10:32 AM

Please help...

>I open a template excel file, add some data to it and save the file. I get "cannot create compound file" error.

Here's the code:

protected IWorkbook _Book;
ExcelEngine excelEngine = new ExcelEngine();
excelEngine.ThrowNotSavedOnDestroy = false;
IApplication excel = excelEngine.Excel;
excel.SheetsInNewWorkbook = 5;
_Book = excel.Workbooks.Open("Template Dir/Filename");

string filePath = "Some file path";
_Book.SaveAs(filePath+_FileName, ExcelSaveType.SaveAsXLS);
_Book.Close();
excelEngine.Dispose();




Melba Winshia [Syncfusion]
Replied On December 3, 2007 01:20 AM

Hi Emperor,

Thank you for your interest in Syncfusion Products.

Normally this exception occurs if you don't have permission to write the file to the specific location on disk. Could you please check that if you have permission to write the file to disk?

Please let me know if the issue still exists after giving permission to write the file.

Thanks,
Melba



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.

;