In my Vsto Excel project, I want to hide multiple sheets of my Excel using vsto code? How can I hide any particular sheet using its name or sheet number?
Thank you very much in advance.
Suppose the name excel is set to MySheet .
To hide it, use
((Excel.Worksheet)Globals.ThisWorkbook.Sheets["MySheet"]).Visible = Excel.XlSheetVisibility.xlSheetHidden;