Cmdlet
Add-OfficeExcelReportSheet
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 SetsExamples
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
- Auto-fit row heights during composer finalization.
- -Content ScriptBlock
- Report block script to run inside the composer context.
- -KeyFillColor String
- Override the key-cell fill color used by KPI and property blocks.
- -Name String
- Name of the report worksheet to create.
- -NoAutoFit SwitchParameter
- Skip composer auto-fit finalization.
- -PassThru SwitchParameter
- Emit the created worksheet.
- -SectionHeaderFillColor String
- 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.