I'm using Closed XML for .Net 4.0 with Macro Enabled Excel, In the sheet I have some buttons, these buttons attached to macros, after opening and then saving the document using closed XML it get corrupted.
the following links show the two files.
https://drive.google.com/file/d/0B7EHvjiS0C8GYWdFSkFwZ3U4S28/edit?usp=sharing
https://drive.google.com/file/d/0B7EHvjiS0C8GUGtIbF84Mk1mZlk/edit?usp=sharing
the code used for opening and saving:
var workbook = new XLWorkbook("Supplier Cost Sheet Template v61.xlsm");
workbook.SaveAs("Book2.xlsm");
the following links show the two files.
https://drive.google.com/file/d/0B7EHvjiS0C8GYWdFSkFwZ3U4S28/edit?usp=sharing
https://drive.google.com/file/d/0B7EHvjiS0C8GUGtIbF84Mk1mZlk/edit?usp=sharing
the code used for opening and saving:
var workbook = new XLWorkbook("Supplier Cost Sheet Template v61.xlsm");
workbook.SaveAs("Book2.xlsm");