Well, I am not entirely sure about your issue. Please make sure that MS Excel (2007/2010 ) is installed on your machine so the generated file should be opened fine in your web project.
I used the following sample code and it works absolutely fine. I just create a blank workbook (after setting the valid license for Aspose.Cells). The output file is opened fine in MS Excel, you may find it attached and confirm on your end by opening it into Ms Excel.
e.g
Sample code:
Aspose.Cells.License license = new Aspose.Cells.License();
FileStream fstream = new System.IO.FileStream(filename, FileMode.OpenOrCreate);
byte[] data = stream.ToArray();
fstream.Write(data, 0, data.Length);
If you still find any issue, kindly do create a sample project (runnable) and post it here (do not attach your license file with your project archive) to reproduce the issue on our end. We will check your issue soon.
Thanx for quick response. The sample code which i have sent to you , is working fine in standalone application(let say console based app).
But my requirement is that we are creating excel document and on the fly we are displaying into web browser(Its web based application). For this we are using webAPI concept.
I am using the following code for creating the excel doc.
//Save in xlsx format and send the file to user so that he may open the file in //some application or save it to some location workBook.Save(this.Response, “Report.xlsx”, ContentDisposition.Attachment, new OoxmlSaveOptions());
Response.End();
If you still find the issue, kindly create a sample web application (runnable) with Aspose.Cells for .NET v7.7.0, zip it and post it here to show the issue, we will check your issue soon.
Also, give us details which MS Excel version you have installed on your machine.
Thank you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.