Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeExcelReportTitle

Aliases: ExcelReportTitle
Module
PSWriteOffice
Aliases
ExcelReportTitle
Inputs
None

Adds the report title and subtitle.

Syntax

Add-OfficeExcelReportTitle
[-PassThru]
[[-Subtitle] <String>]
[-Title] <String>
[<CommonParameters>]
#
Parameter set: Default

Examples

Add a report title

New-OfficeExcel -Path .\Reports\Operations.xlsx {
    ExcelReportSheet 'Summary' {
        ExcelReportTitle 'Operations summary'
    }
}

Adds the title block at the top of a report sheet.

Add a title with the reporting period

$period = (Get-Date).ToString('MMMM yyyy')
New-OfficeExcel -Path .\Reports\Capacity-Review.xlsx {
    ExcelReportSheet 'Capacity' {
        ExcelReportTitle 'Capacity review' "Storage and compute, $period"
        ExcelReportTable (Import-OfficeCsv -Path .\Data\Capacity.csv) 'Clusters'
    }
}

Adds a title and a subtitle built from the current month, so a scheduled run labels itself.

Parameters

-PassThru SwitchParameter optional
Emits the native result after the operation.
-Subtitle String optionalposition: 1
Dashboard subtitle.
-Title String requiredposition: 0
Chart title.

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.