OfficeIMO

API Reference

Command

Set-OfficeExcelColumn

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

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

Remarks

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

Examples

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 <Nullable`1>] [-ColumnName <String>] [-Hidden <Nullable`1>] [-StartRow <Int32>] [-Values <Object[]>] [-Width <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

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

Outputs

System.Object