# Set-OfficeExcelRowGroup

Configures collapsible Excel outline grouping for worksheet rows.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: ExcelRowGroup

**Module**

`PSWriteOffice`

**Aliases**

`ExcelRowGroup`

**Inputs**

`None`

**Source**

[SetOfficeExcelRowGroupCommand.cs:17](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/SetOfficeExcelRowGroupCommand.cs#L17) 

Configures collapsible Excel outline grouping for worksheet rows.

## Syntax

```
Set-OfficeExcelRowGroup
[-Clear]
[-Collapsed]
[[-EndRow] <Int32>]
[-Hidden]
[-KeepHidden]
[-OutlineLevel <Int32>]
[-PassThru]
[-StartRow] <Int32>
[-SummaryBelow <Boolean>]
[<CommonParameters>]
```

[#](#method-set-officeexcelrowgroup-switchparameter-switchparameter-int32-switchparameter-switchparameter-int32-switchparameter-int32-boolean)

Parameter set: `All Parameter Sets`

## Examples

### Group detail rows and collapse them.

```powershell
ExcelSheet 'Data' { Set-OfficeExcelRowGroup -StartRow 2 -EndRow 20 -Collapsed }
```

Applies Excel row outline metadata using OfficeIMO.

## Parameters

**-Clear SwitchParameter optional**

Clear row grouping metadata from the target range.

**-Collapsed SwitchParameter optional**

Hide the grouped rows and mark the following summary row as collapsed.

**-EndRow Int32 optionalposition: 1**

Last 1-based row in the group. Defaults to StartRow.

**-Hidden SwitchParameter optional**

Hide the grouped rows without marking the group collapsed.

**-KeepHidden SwitchParameter optional**

Keep hidden rows hidden when clearing row grouping metadata.

**-OutlineLevel Int32 optional**

Excel outline level from 1 through 7.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-StartRow Int32 requiredposition: 0**

First 1-based row in the group.

**-SummaryBelow Boolean optional**

Set whether row summary controls appear below grouped 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:DA2169057CCC59E01C396C88E8009A9414DA1C143119B53AC7F8CFE902BBB95E -->
