Free Support Forum - aspose.com

Error While opening 2 excels simultaneously using aspose.cells

Hi,

I am using aspose.cells to export HTML reports to excel. I am not using a template excel workbook for this purpose, insted I create a new workbook everytime. If I try to export 2 different reports to excel at the same time. , I get an error like "Error: Can not .... " , In general, I cant open more than one excel at a time. Is this a limitation? Do we have an alternative for this ?

Rgds

Soumya

Hi,

Thanks for considering Aspose.

How do you create your Workbooks? Could you please post your sample code to us so that may sort out the things

Thanks

Regards

Amjad Sahi

Aspose Nanjing Team

Hi Soumya,

Is you program a web application or desktop application? What's the exact error message? Is it thrown by Aspose.Cells or shown in MS Excel?

Hi,

My application is a web application. This error is thrown my Microsoft excel.I have attached the snap shot of the error. The page viewerContent.aspx is the page which calls a class that saves the complete workbook into a stream -

//load the complete workbook to the stream

workbook.Save(ms, FileFormatType.Default);

Then renders it using the following code -

obj = ms.ToArray();

this.Context.Response.Clear();

this.Context.Response.ContentType = "application/vnd.ms-excel";

this.Context.Response.AddHeader("content-disposition", "inline; filename=" + ReportName + ".xls");

this.Context.Response.OutputStream.Write(obj, 0, obj.Length);

this.Context.Response.End();

Could you please tell me Y this happens and what I must do? However, when I click ok on this warning message the excel actually opens.

Rgds,

Soumya

Hi Soumya,

This is not a problem of Aspose.Cells, but IE. It must generate the file with name of your aspx name which caused your problem.

You can try to move your code to Page_Load event handler.

Could you post your project here or send it to nanjing@aspose.com ? Thank you.