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

Wrong Library Version?

May 29, 2012 at 10:01 PM
Edited May 29, 2012 at 10:36 PM


I tried to apply this example in  Visual studio2008 C#: 


    using (ExcelPackage pck = new ExcelPackage())
                foreach (DataTable tbl in dataSet.Tables)
                    ExcelWorksheet ws = pck.Workbook.Worksheets.Add(tbl.TableName);
                    ws.Cells["A1"].LoadFromDataTable(tbl, true);

                HttpResponse Response = System.Web.HttpContext.Current.Response;
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                Response.AddHeader("content-disposition", "attachment;  filename=Sample1.xlsx");


But i get an error on the constructor of ExcelPackage:
Cannot resolve constructor 'ExcelPackage' candidates are:
ExcelPackage(System.IO.FileInfo) (in class ExcelPackage)
ExcelPackage(System.IO.FileInfo, System.IO.FileInfo) (in class ExcelPackage)

Also the object ExcelWorkSheet does not have the method 'SaveAs' only 'Save', I have referenced this dll on my project:



using OfficeOpenXml;

Please take me out of my ignorance and excuse my english.

Thanks in advance. 

May 30, 2012 at 12:52 AM

I just downloaded EPPlus 3.0.

Reference to it and now it works.

Thank you very much for your hard work on this library.