I’m trying to save a workbook which contains some macros and a dynamic range. This worksheet has 3 worksheets. If I write this code everything goes fine:
Workbook wb = new Workbook(Server.MapPath("~") + “workbook/ETAT1 - Compte de résultat v2_0.xlsm”);
wb.Save(“C:/test.xlsm”);
However if I delete the third worksheet before Save, it causes a corrupted file :
Workbook wb = new Workbook(Server.MapPath("~") + “workbook/ETAT1 - Compte de résultat v2_0.xlsm”);
wb.Worksheets.RemoveAt(2);
wb.Save(“C:/test.xlsm”);
I have attached to this post a sample project which shows the issue.
Thank you for contacting support. We managed to replicate the problem of corrupt output XLSM. We have logged an investigation under ticket ID CELLSNET-45275 in our bug tracking system. Your post has also been linked to this ticket. We shall keep you informed regarding any available updates. We are sorry for the inconvenience caused.
This is to inform you that we have fixed your issue “CELLSNET-45275” now. We will soon provide the fix after performing QA and including other enhancements and fixes.