support for 2003 xls

Nov 24, 2011 at 5:34 PM

I'm quite confused, In the title of each page written EPPlus create excel 2007 and in many discussion threads I read the authors saying that EPPlus doesn't support 2003-xls format reading nor writing (like this, this, and this)

And in this thread someone post a code that will able save xls format with EPPlus, will it work? and if it's so simple, why it's not official supported?

If EPPlus doesn't support 2003, which library support 2003-2010 formats?

Nov 25, 2011 at 10:59 AM

No, it doesn't support xls format.  xls completely different to xlsx.  Epplus will allow you to save with any file extension you like, so you can use xls, but it will still be in 2007 format.

Nov 26, 2011 at 3:46 PM

And If I write the code commented in the tread:

ExcelPackage pck = new ExcelPackage();
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Demo");
ws.Cells["A1"].LoadFromDataTable(dataTable, true);
FileStream aFile = new FileStream("c:\\data\\excelfile.xls", FileMode.Create);
byte[] byData = pck.GetAsByteArray(); 
aFile.Seek(0, SeekOrigin.Begin);
aFile.Write(byData, 0, byData.Length);

If I write workbook with EPPlus and save it as .xls, Excel 2003 could open and print the workseets in it?