Set-SLColumnWidth


Synopsis

Set column width by name or index.

Syntax

Description

Set column width by name or index.A single column or a range of columns can be specified as input.

Parameters

-WorkBookInstance

Instance of an excel document that can be used for editing.

Required? True
Position? 0
Default value  
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-WorksheetName

Name of the Worksheet that is to be processed.

Required? False
Position? 1
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-ColumnName

The column name. Eg: A or B.

Required? True
Position? 2
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ColumnWidth

Specifies the column width to be applied. Eg: 20.

Required? True
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ColumnIndex

The column index. Eg: 2 or 5.

Required? True
Position? 2
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-StartColumnName

Specifies the start of the column range. Eg: A.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-ENDColumnName

Specifies the end of the column range. Eg: G.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-StartColumnIndex

Specifies the start index of the column range. Eg: 1 .

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-ENDColumnIndex

Specifies the end index of the column range. Eg: 7.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

String,Int,SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

Set columnwidth F to 30.

Example 2

Set columnwidth of a range F – H to 30.

Example 3

Set columnwidth F to 30(Header column). Set columnwidth of column range 7-8 to 20(data columns)

Related links