HTTPS SSL Issue

HTTPS/SSL Problem

Some users reported that they had problems to download Excel files generated with Aspose.Cells. When the save dialog opens, the file name contains the name of the aspx page instead of the excel file, and the File Type is blank.

Explanation

We changed HTTP response headers to solve the problem with HTTP compression. This may cause problem while sending files to client browser through HTTPS/SSL.

Solution

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Saves file to memory
MemoryStream stream = new MemoryStream();
excel.Save(stream, SaveFormat.Excel97To2003);
Response.ContentType = "application/vnd.ms-excel";
// This is same as OpenInExcel option
Response.AddHeader("content-disposition", "attachment; filename=book1.xls");
// This is same as OpenInBrowser option
// response.AddHeader("content-disposition", "inline; filename=book1.xls");
Response.BinaryWrite(stream.ToArray());