Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Set-OfficeExcelSheetVisibility

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Shows or hides a worksheet.

Remarks

Shows or hides a worksheet.

Examples

Authored help example

Hide the current worksheet.

PS>


ExcelSheet 'Data' { Set-OfficeExcelSheetVisibility -Hide }
        

Marks the sheet as hidden.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-OfficeExcelSheetVisibility [-Hide] [-PassThru] [-Show] [<CommonParameters>]
#
Parameter set: Context

Parameters

Hide SwitchParameter optionalposition: namedpipeline: False
Hide the worksheet.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after applying visibility.
Show SwitchParameter optionalposition: namedpipeline: False
Show the worksheet.

Outputs

System.Object

Set-OfficeExcelSheetVisibility -Document <ExcelDocument> [-Hide] [-PassThru] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-Show] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to operate on outside the DSL context.
Hide SwitchParameter optionalposition: namedpipeline: False
Hide the worksheet.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after applying visibility.
Sheet String optionalposition: namedpipeline: False
Worksheet name when using Document.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) when using Document.
Show SwitchParameter optionalposition: namedpipeline: False
Show the worksheet.

Outputs

System.Object