File Error - data may have been lost

Hi

I have been using Aspose Cells for over a year now without fault. Just today I received the error message 'File Error' data may have been lost whenever I try and open any of the spreadsheets using Aspose Cells. I tried updating the dll files to the latest version but my license key isn't valid for Aspose Cell updates past May this year. I'm using version 3.9.1.0.

I've looked on the forum but not found a definite answer.

Here's the code to save the file(the full code is attached):

// Save workbook
DateTime CurrTime = DateTime.Now;
string NewFileName = "ShowBudget-" + CurrTime.ToString("ddMMyy-HHmmss") + ".xls";
MemoryStream stream = new MemoryStream();
workbook.Save(stream, FileFormatType.Default);

HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";

HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + NewFileName);

HttpContext.Current.Response.BinaryWrite(stream.ToArray());
}

Any ideas?

Thanks

James

Hi James,

Since you are using some older version of Aspose.Cells.

Please try the latest version of Aspose.Cells 4.4. If the problem still persists, post your sample test code with your template file to show the problem. We will check and try to resolve it soon.

Thank you.

Hi Amjad

The latest version has fixed the problem

Thanks

James

Hi James,

Ok! that's fine