Cmdlet
Add-OfficeExcelReportHeading
Adds a section heading to the report.
Syntax
Add-OfficeExcelReportHeading
[-PassThru]
[-Text] <String>
[<CommonParameters>]#Parameter set:
DefaultExamples
Add a section heading
New-OfficeExcel -Path .\Reports\Operations.xlsx {
ExcelReportSheet 'Summary' {
ExcelReportHeading 'Incidents'
}
}Starts a new section of the report.
Split a report into sections
New-OfficeExcel -Path .\Reports\Security-Review.xlsx {
ExcelReportSheet 'Review' {
ExcelReportTitle 'Security review' 'Q3 2026'
ExcelReportHeading 'Privileged accounts'
ExcelReportTable (Import-OfficeCsv -Path .\Data\Privileged-Accounts.csv)
ExcelReportHeading 'Firewall changes'
ExcelReportTable (Import-OfficeCsv -Path .\Data\Firewall-Changes.csv)
}
}Gives each part of a security report its own heading and table.
Parameters
- -PassThru SwitchParameter
- Emits the native result after the operation.
- -Text String
- Comment text.
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.