API Reference
Command
Set-OfficeExcelColumn
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 SetsParameters
- AutoFit SwitchParameter
- Auto-fit the column width after updates.
- Column Nullable`1
- 1-based column index.
- ColumnName String
- Column letter reference (e.g., A, BC).
- Hidden Nullable`1
- Hide or show the column.
- StartRow Int32
- Starting row index (1-based) for values.
- Values Object[]
- Values to write down the column.
- Width Nullable`1
- Column width to apply.
Outputs
System.Object