Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeExcelReportSpacer

Aliases: ExcelReportSpacer
Module
PSWriteOffice
Aliases
ExcelReportSpacer
Inputs
None

Adds vertical space to the report.

Syntax

Add-OfficeExcelReportSpacer
[-PassThru]
[[-Rows] <Int32>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Add space between blocks

New-OfficeExcel -Path .\Reports\Operations.xlsx {
    ExcelReportSheet 'Summary' {
        ExcelReportTitle 'Operations summary'
        ExcelReportSpacer
        ExcelReportParagraph 'Week 43, 2026'
    }
}

Leaves one empty row between two report blocks.

Separate KPIs from the detail

New-OfficeExcel -Path .\Reports\Helpdesk-Review.xlsx {
    ExcelReportSheet 'Review' {
        ExcelReportKpi ([ordered]@{ Opened = 412; Closed = 398; 'Median age' = '1.6 days' })
        ExcelReportSpacer 2
        ExcelReportTable (Import-OfficeCsv -Path .\Data\Tickets-By-Team.csv) 'Tickets by team'
    }
}

Leaves two rows between the KPI cards and the detail table to give the summary room.

Parameters

-PassThru SwitchParameter optional
Emits the native result after the operation.
-Rows Int32 optionalposition: 0
Auto-fit all rows.

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.