This project has moved. For the latest updates, please go here.

Saved xlsm file is corrupted

Mar 12, 2014 at 12:57 AM
I have a very basic program that loads a xlsm file into an Excel Package object and then saves it into a new file. The new file is corrupt and I cannot open it in Excel? What's is wrong?

static void Main(string[] args)
    {
        using (ExcelPackage _package = new ExcelPackage(new FileInfo(args[0])))
        {
            _package.SaveAs(new FileInfo(args[1]));
        }
    }