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

MS Access does not open generated by EPP Excel files

Nov 12, 2015 at 10:36 AM
Edited Nov 12, 2015 at 11:15 AM
Steps to reproduce:
  1. Get any file generated by EPP. (f.e. from provided Samples project )
  2. Try to import as a table to Access.
  3. It fails with:
    "... Please check that file exists and is in the correct format".
BUT it is enough to OPEN this file in MS Excel and save it back without any edit change
and then TADA import to Access this very same file succeeds.

Q is how to generate file from EPP to make it importable by MS ACCESS without involving Excel?

Thanks in advance for any hint

Lukasz Wilczynski
Nov 13, 2015 at 10:36 AM
Extra info.

Assume you have Excel file which can be imported by Access (call it "valid excel").

So if you open this "valid excel" with EPP (as ExcelPackage from FileInfo - simplest way)....

ExcelPackage packEx = new ExcelPackage(existingValidFile);

... and save it at once without any changes....

packEx.SaveAs(new FileInfo("c:\copyOfValidFile.xlsx"));

... oops... it becomes "invalid" (read: MS Access can not import copyOfValidFile anymore).
Excel can open it. Access can not.

Seems - at the moment - there is no way to save valid ExcelFile with EPP.

EPP unintentionaly cuts some really important information from file.


Lukasz Wilczynski