Set-SLColumnValue


Synopsis

Set column values.

Syntax

Description

Set column values..
values cannot span multiple columns. Values are set on a single column moving from top to bottom until the value enumeration stops.

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

-CellReference

The CellReference that specifies the start row and start column. Eg: A5 or AB10

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

-value

User can specify single or multiple values. Value assignment flow is from top to bottom.

Required? True
Position? 3
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,SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

Since we specified 3 values(jan,feb & march) the cell values start from b3 and flows down to b5.

Example 2

We build on the previous example by setting a cell style:&;39;Accent1&;39; on the cells whose values were set using &;39;Set-columnValue&;39;.
Note: Since we piped the output of Set-SLColumnValue we didnt have to specify a worksheetname or cell range with the &;39;Set-SLBuiltinCellStyle&;39; cmdlet because those values are automatically mapped from the “SLdocument” object .

Related links

Stay in touch

Linkedin // RSS Feed