.xlsm Unhide Worksheets

Tried to unhide all the worksheets of a workbook file of type .xlsm with the below code and 3 of the worksheets remain Hidden still:
var xlsmTemplate = pathToDir + “APIReport.xlsm”;
Workbook wbTemplate = new Workbook(xlsmTemplate);
WorksheetCollection sheets = wbTemplate.Worksheets;
foreach (Worksheet sheet in sheets)
{
sheet.VisibilityType = VisibilityType.Visible;
}
wbTemplate.Save(pathToTemp + “APITemplate.xlsm”, SaveFormat.Xlsm);

@Remus87,
I have tried this scenario using one of my own sample file but could not observe any issue using the latest version Aspose.Cells for .NET 20.11. You may please test this issue using the latest version and if issue is there, share your sample XLSM with us for testing. We will reproduce the issue here and share our feedback.

Thank you for the prompt reply. Found another workaround by excluding the VBA codes/macros while loading the file into Aspose.Cells object model and works fine now

@Remus87,

Good to know that you have sorted out your issue. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.