Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Excel.SheetVisibility enum
- Package:
- excel
Remarks
Used by
- Excel.Worksheet: visibility
- Excel.WorksheetVisibilityChangedEventArgs: visibilityAfter, visibilityBefore
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/54-worksheet/worksheet-visibility.yaml
await Excel.run(async (context) => {
const visibleSheets = await filterWorksheetsByVisibility(context, Excel.SheetVisibility.visible);
if (visibleSheets.length > 1) {
console.log(`Hiding worksheet named "${visibleSheets[0].name}"...`);
visibleSheets[0].visibility = Excel.SheetVisibility.hidden;
await context.sync();
} else {
console.log("Cannot hide the only visible worksheet");
}
});
Fields
| hidden = "Hidden" | |
| veryHidden = "VeryHidden" | |
| visible = "Visible" |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
