Xceed Workbooks for .NET v2.0 Documentation
CopyAndPasteTo(Int32,Int32,PasteOptions,Worksheet,CopyOptions) Method


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > CellRange Class > CopyAndPasteTo Method : CopyAndPasteTo(Int32,Int32,PasteOptions,Worksheet,CopyOptions) Method
The RowID used to determine where the CellRange will be pasted. 
The ColumnID used to determine where the CellRange will be pasted. 
The PasteOptions; in other words, what type of data will be pasted into the new location.
The Worksheet in which the data will be pasted; by default, this is set to null, which means that the data will be pasted in the current Worksheet.  
The CopyOptions; by default, this is set to Copy
Copies the CellRange from its current location and pastes it to a new location, using a RowID & a ColumnID to determine where the data will be pasted. 
Syntax
'Declaration
 
Public Overloads Sub CopyAndPasteTo( _
   ByVal rowId As Integer, _
   ByVal columnId As Integer, _
   Optional ByVal pasteOptions As PasteOptions, _
   Optional ByVal otherWorksheet As Worksheet, _
   Optional ByVal copyOption As CopyOptions _
) 
'Usage
 
Dim instance As CellRange
Dim rowId As Integer
Dim columnId As Integer
Dim pasteOptions As PasteOptions
Dim otherWorksheet As Worksheet
Dim copyOption As CopyOptions
 
instance.CopyAndPasteTo(rowId, columnId, pasteOptions, otherWorksheet, copyOption)

Parameters

rowId
The RowID used to determine where the CellRange will be pasted. 
columnId
The ColumnID used to determine where the CellRange will be pasted. 
pasteOptions
The PasteOptions; in other words, what type of data will be pasted into the new location.
otherWorksheet
The Worksheet in which the data will be pasted; by default, this is set to null, which means that the data will be pasted in the current Worksheet.  
copyOption
The CopyOptions; by default, this is set to Copy
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CellRange Class
CellRange Members
Overload List