Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用c sharp VSTO代码隐藏特定的Excel工作表?_Excel_Vsto - Fatal编程技术网

如何使用c sharp VSTO代码隐藏特定的Excel工作表?

如何使用c sharp VSTO代码隐藏特定的Excel工作表?,excel,vsto,Excel,Vsto,在我的Vsto Excel项目中,我想使用Vsto代码隐藏几张Excel表? 如何隐藏任何特定的工作表,即使用其名称或工作表编号 非常感谢。让我们假设excel的名称是MySheet 要隐藏它,请使用 ((Excel.Worksheet)Globals.ThisWorkbook.Sheets["MySheet"]).Visible = Excel.XlSheetVisibility.xlSheetHidden; 谢谢你的回答。因为大声叫喊,他们不能只拥有一个可见的财产,嗯/

在我的Vsto Excel项目中,我想使用Vsto代码隐藏几张Excel表? 如何隐藏任何特定的工作表,即使用其名称或工作表编号


非常感谢。

让我们假设excel的名称是MySheet

要隐藏它,请使用

((Excel.Worksheet)Globals.ThisWorkbook.Sheets["MySheet"]).Visible = Excel.XlSheetVisibility.xlSheetHidden;

谢谢你的回答。因为大声叫喊,他们不能只拥有一个可见的财产,嗯/