Copy-SLCellValue


Synopsis

Copy a single or a range of cell values.

Syntax

Description

Copy a single or a range of cell values. Source data can be on a worksheet that is different than the target.

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? True
Position? 1
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-FromWorksheetName

The worksheet containing the source data.

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

-FromCellReference

the source cell containing the data to be copied Eg. A3

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

-ToCellreference

the target cell where data is to be copied to Eg. A3

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

-PasteSpecial

Specift special paste options such as:
&;39;Formatting&;39;,&;39;Formulas&;39;,&;39;Paste&;39;,&;39;Values&;39;,&;39;Transpose&;39;

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

-Range

The source data range to be copied Eg. A1:C3

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

-ToAnchorCellreference

The cell reference of the target anchor cell, such as “A1″.

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

-CutorCopy

Specify whether data is to be copied or pasted

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,SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

Copy cell B2 to C2.

Example 2

copy only formatting settings from B2 to D2.

Example 3

Cut cell C3 and paste it to F2.

Example 4

Copy B2 from sheet4 and paste it to E2 on sheet6

Example 5

Copy range A9:C15 to E9

Example 6

Copy range A9:A15 from sheet4 and paste only the values (ignore any style settings applied to the range) to anchor cell J9 on sheet6.

Example 7

Copy range A9:A15 from sheet4 and transpose the values (convert row to column and viceversa) to anchor cell N9 on sheet6.

Related links