Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeExcelReportSheet

Aliases: ExcelReportSheet
Module PSWriteOffice
Aliases
ExcelReportSheet
Inputs
None

Creates a worksheet through the OfficeIMO sheet composer and runs report-block cmdlets inside it.

Syntax

Add-OfficeExcelReportSheet [-AutoFitRows] [[-Content] <ScriptBlock>] [-KeyFillColor <String>] [-Name] <String> [-NoAutoFit] [-PassThru] [-SectionHeaderFillColor <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Create a composed report sheet.

New-OfficeExcel -Path .\report.xlsx {
  Add-OfficeExcelReportSheet -Name Summary {
    Add-OfficeExcelReportTitle -Title 'Operational Summary' -Subtitle 'Current view'
    Add-OfficeExcelReportKpiRow -InputObject @{ Ready = 12; Blocked = 2 }
  }
}

Creates a report-oriented worksheet with title and KPI blocks.

Parameters

-AutoFitRows SwitchParameter optional
Auto-fit row heights during composer finalization.
-Content ScriptBlock optionalposition: 1
Report block script to run inside the composer context.
-KeyFillColor String optional
Override the key-cell fill color used by KPI and property blocks.
-Name String requiredposition: 0
Name of the report worksheet to create.
-NoAutoFit SwitchParameter optional
Skip composer auto-fit finalization.
-PassThru SwitchParameter optional
Emit the created worksheet.
-SectionHeaderFillColor String optional
Override the section-header fill color.

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.