error opening package

Jan 11, 2011 at 8:40 PM

I receive the following error when trying to open an existing .xls file:

   Error: Can not open the package. Package is an OLE compound document. If this is an encrypted package, please supply the password Line: EPPlus

The file is not encrypted, but does have multiple worksheets. Here is my code:

    FileInfo xlsFile = new FileInfo(@fileString);

    ExcelPackage excelApp = new ExcelPackage(xlsFile);  --> fails on this line


I've tried using a FileStream, but that fails with the same error. What am I doing wrong?


Jan 12, 2011 at 6:07 AM

Make sure you use a XLSX file as a template. XLS will not work.

Also, make sure you don't have a digital signature in the template.