Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
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

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.