Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Set-OfficeExcelRow

Aliases: ExcelRow
Namespace PSWriteOffice
Aliases
ExcelRow
Inputs
None

Writes a row of values to the current worksheet.

Remarks

Writes a row of values to the current worksheet.

Examples

Authored help example

Write a row starting at column A.

PS>


ExcelSheet 'Data' { Set-OfficeExcelRow -Row 2 -Values 'North', 1200 }
        

Writes two values into row 2, columns A and B.

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.

Syntax

Set-OfficeExcelRow [-AutoFit] [-BackgroundColor <String>] [-Bold <Boolean>] [-ClearHeight] [-FirstColumn <Int32>] [-FontName <String>] [-Height <Double>] [-Hidden <Boolean>] [-Italic <Boolean>] [-LastColumn <Int32>] [-PassThru] -Row <Int32> [-StartColumn <Int32>] [-Underline <Boolean>] [-Values <Object[]>] [-WrapText <Boolean>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoFit SwitchParameter optionalposition: namedpipeline: False
Auto-fit row height after writing values and applying style.
BackgroundColor String optionalposition: namedpipeline: False
Apply a background color across the target row span.
Bold Boolean optionalposition: namedpipeline: False
Apply or clear bold styling across the target row span.
ClearHeight SwitchParameter optionalposition: namedpipeline: False
Clear any custom row height.
FirstColumn Int32 optionalposition: namedpipeline: False
First 1-based column affected by style options.
FontName String optionalposition: namedpipeline: False
Apply a font family across the target row span.
Height Double optionalposition: namedpipeline: False
Explicit row height in points.
Hidden Boolean optionalposition: namedpipeline: False
Hide or unhide the row. Use -Hidden:$false to unhide.
Italic Boolean optionalposition: namedpipeline: False
Apply or clear italic styling across the target row span.
LastColumn Int32 optionalposition: namedpipeline: False
Last 1-based column affected by style options.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the object created or changed by the command.
Row Int32 requiredposition: 0pipeline: False
1-based row index.
StartColumn Int32 optionalposition: namedpipeline: False
Starting column index (1-based).
Underline Boolean optionalposition: namedpipeline: False
Apply or clear underline styling across the target row span.
Values Object[] optionalposition: 1pipeline: False
Values to write across the row.
WrapText Boolean optionalposition: namedpipeline: False
Apply or clear wrap text across the target row span.