Deleting worksheet in XLSM leaves behind a remnant sheet in vba project

Using Aspose.Cells, version 8.5.2.0. PFA Sample.xlsm.

This is what the sample file VBA project looks like before deleting "Second" worksheet.

Sample code :

Workbook wb = new Workbook("Sample.xlsm");
Worksheet ws = wb.Worksheets["Second"];
wb.Worksheets.RemoveAt(ws.Index);
wb.Save("Sample.xlsm");

Afterwards, the sheet is gone but the VBA project still shows the sheet as a ThisWorkbook object :

Hi,


Thanks for the template file and sample code with screenshots.

After an initial test, I am able to observe the issue as you mentioned (via your screenshots) by using your sample code with your template XLSM file. I found by deleting a worksheet in an XLSM file still leaves behind it in the vba project, the sheet can be seen in Microsoft Visual Basic editor in MS Excel.
e.g
Sample code:

Workbook wb = new Workbook(“Sample.xlsm”);
Worksheet ws = wb.Worksheets[“Second”];
wb.Worksheets.RemoveAt(ws.Index);
wb.Save(“Sample.xlsm”);

I have logged a ticket with an id “CELLSNET-45292” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.
Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-45292 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.3.10 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.3.10 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-45292) have been fixed in Aspose.Cells for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.