Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide particular Excel Sheets using c sharp VSTO Code?

Tags:

excel

vsto

In my Vsto Excel project, i want to hide few sheets of my Excel using vsto code ? how i can Hide any particular sheet i.e using its name or sheet No. ?

Thanks a lot in advance.

like image 401
Sangram Nandkhile Avatar asked Aug 27 '26 01:08

Sangram Nandkhile


1 Answers

Lets assume name of the excel is MySheet.

To hide it, use

((Excel.Worksheet)Globals.ThisWorkbook.Sheets["MySheet"]).Visible = Excel.XlSheetVisibility.xlSheetHidden;
like image 195
Sangram Nandkhile Avatar answered Aug 30 '26 00:08

Sangram Nandkhile



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!