I am trying to use Aspose Excel for the first time and I am having trouble getting it to work. I have a website that needs to generate an excel file and open it in a new window. I want it to work something like the following code would work:
Response.ContentType = “application/vnd.ms-excel”;
Here is how I have tried to do this with Aspose:
Excel ExcelDocument = new Excel();
Cell cell1 = ExcelDocument.Worksheets.Cells[“A1”];
ExcelDocument.Save(“test.xls”, Aspose.Excel.SaveType.OpenInExcel, Aspose.Excel.FileFormatType.Default, Response);
When this opens Excel it gives me the error message “Unable to read file” and opens a blank worksheet. Could you please tell me what I am doing wrong.