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

Not Saving

Apr 8, 2011 at 4: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.

Coordinator
Apr 10, 2011 at 7:40 PM

Version 2.8.0.2?

Can you provide an example?

Apr 20, 2011 at 6:37 PM
Edited Apr 20, 2011 at 6: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;
                        
//Save
pck.Save();



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