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

Not Saving

Apr 8, 2011 at 5:29 PM

In the previous version, the Save() method worked just fine after setting values in a worksheet.  With the latest version, the save does not save the file.  After calling ExcelPackage.Save(), I null the worksheet, dispose the package, and close the file stream.  I had to rollback to the previous version to verify and it does work with the previous version.

Apr 10, 2011 at 8:40 PM


Can you provide an example?

Apr 20, 2011 at 7:37 PM
Edited Apr 20, 2011 at 7:40 PM
FileStream fs = null;

ExcelPackage pck = null;
ExcelWorksheet ws = null;
fs = new FileStream("FILE_PATH", FileMode.Open, FileAccess.ReadWrite);

pck = new ExcelPackage(fs);

//ExcelWorksheet indexes are not zero based
ws = pck.Workbook.Worksheets[1];

ws.Cells["A1"].Value = Value;

Apr 26, 2011 at 7:57 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.