ASPOse.Excel failed on the HTTPS (SSL)


Hi ,

I tried to generate an excel file on my aspx. It works fine on normal http connection. However, it failed on the https connection.
The scenario is:
1. The excel is generated on the click button event.
2. I invoke the save method on the excel object.

excelExportedData.Save(“MyExcelFile.xls”, Aspose.Excel.SaveType.OpenInExcel, Aspose.Excel.FileFormatType.Default, this.Response);

The error given on the excel application:
1. A dialog box with error message "Could not open “”.
2. Once click on the OK button, another dialog box open "Microsoft excel cannot access the file … "

Would you be able to provide to solution to this?

  1. Please check your IE security settings.

    2. If you cannot figure it out, you can try the follwing method:

    2.1 Save the file in your server and provide a link for your customer.

    2.2 Save file in stream and try to use your program to stream it to client.

    MemoryStream stream = new MemoryStream();
    excel.Save(stream, FileFormatType.Default);
    byte[] data = stream.ToArray();

    response.ContentType = “application/”;
    response.AddHeader( “content-disposition”,“attachment; filename=MyExcelFile.xls”);




I tried, it does not work.
It has the same problem.

Any other methods?


Does the following code cause the same problem?

FileStream fs1 = new FileStream("d:\\book1.xls", FileMode.Open, FileAccess.Read);
byte[] data1 = new byte[fs1.Length];
fs1.Read(data1, 0, data1.Length);

this.Response.ContentType = "application/xls";
Response.AddHeader( "content-disposition","inline; filename=book1.xls");

I think maybe https has some restricts on binary data streaming. In our machines, we always use default settings in IE. And most of other users have no difficulties with default settings in IE.

So in your case, the best way may be generating the file on disk and providing your users a link.



We are having the same issue. The example with the filestream is working, but
excel.Save(filename, FileFormatType.Excel2003, SaveType.OpenInExcel, Response);

is not working. Are you setting the headers of the response object?

Found this KB article describing the problem:;en-us;316431

This is really urgent for us. Any help would be very appreciated!



Please try this attached version.


Much better :slight_smile: We were using and have used it for all the testing. Can we safely replace this file with Not any large changes that I need to know about?

Thanks for great support. Really saved my day :slight_smile:



Testing is need. V4.0.1.5 is not a public release.

If you want to use v4.0.0.3 and don't want to re-do the testing. Please try the solution here: .