This project has moved and is read-only. For the latest updates, please go here.

EPPlus 4.1.0 Excel Unreadable content issue

May 25, 2017 at 11:01 AM
Basically i am building Dynamic Excel using EPPlus 4.1.0. The problem am facing is when i download the excel and click open. Its throwing error as "Excel found unreadable content in .xlsx. Do you want to recover the contents of this workbook? If you trust the source of this workbook,click Yes"

I am using below steps to generate excel :
1.Creating new Excel Package -- ExcelPackage ex = new ExcelPackage()
2.Creating new worksheet -- ExcelWorksheet ws = ex.Workbook.Worksheets.Add("Demo");
3.Working on that worksheet -- Content,alignment,coloring etc..
4.Saving the response
    Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
    Response.AddHeader("content-disposition", "attachment;  filename=ExcelDemo.xlsx");
5.On click of Download, ill get options to save open etc. When i select Open,it throws the above error.
This error not happening in EPplus3. versions. But we need to use latest versions for building dynamic excel data with formatting in it.