Corrupted Xlsx file in a Web application

Hi, I have a problem with creating an Xslx report in an Web app.

I'm creating a xlsx file in an ASP.NET app using this code:

wrkbk.Open(templateFileName, FileFormatType.Excel2007Xlsx);

wrkbk.Save(outputFileName, FileFormatType.Excel2007Xlsx, SaveType.OpenInExcel, Response);

The file I get is corrupted and can't be opened.

The file is OK when created in an WinForms application using this code:

workbook.Open("ReportByFIFO.xlsx", FileFormatType.Excel2007Xlsx);

workbook.Save("Test.xlsx", FileFormatType.Excel2007Xlsx);

Version of the Aspose.Cells.Dll used is 4.3.0.10. The original an the corrupted files are attached.

Thank's for Your help.

Pavel Klocek

Hi,

Thanks for considering Aspose.

Well, we don't find your template file (ReportByFIFO.xlsx) and output files in your attached zipped file.

Could you post here again, so that we may check and figure out the issue soon.

Thank you.

Sorry, my mistake. This time should be attached the correct file.

Thank You.

Hi,

Thanks for the file(s). We will figure out the issue soon.

Thank you.

Please try this attached fix.

OK, this helped. The generated file is no longer corrupted.

Thank You.