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-OfficeExcelColumn

Aliases: ExcelColumn
Namespace PSWriteOffice
Aliases
ExcelColumn
Inputs
None

Writes values or formatting to a column in the current worksheet.

Remarks

Writes values or formatting to a column in the current worksheet.

Examples

Authored help example

Populate a column and auto-fit it.

PS>


ExcelSheet 'Data' { Set-OfficeExcelColumn -Column 1 -Values 'North','South' -AutoFit }
        

Writes values into column A and adjusts the width.

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-OfficeExcelColumn [-AutoFit] [-Column <Int32>] [-ColumnName <String>] [-Hidden <Boolean>] [-PassThru] [-StartRow <Int32>] [-Values <Object[]>] [-Width <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoFit SwitchParameter optionalposition: namedpipeline: False
Auto-fit the column width after updates.
Column Int32 optionalposition: 0pipeline: False
1-based column index.
ColumnName String optionalposition: namedpipeline: Falsealiases: ColumnLetter, Letter
Column letter reference (e.g., A, BC).
Hidden Boolean optionalposition: namedpipeline: False
Hide or show the column.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the object created or changed by the command.
StartRow Int32 optionalposition: namedpipeline: False
Starting row index (1-based) for values.
Values Object[] optionalposition: namedpipeline: False
Values to write down the column.
Width Double optionalposition: namedpipeline: False
Column width to apply.