Spread WPF Documentation
MoveTo(Int32,Int32,Int32,Int32,Int32,Int32,CopyToOption) Method
Example 


The source row.
The source column.
The target row.
The target column.
The row count.
The column count.
The move option.
Moves data from one range to another.
Syntax
'Declaration
 
Public Sub MoveTo( _
   ByVal fromRow As System.Integer, _
   ByVal fromColumn As System.Integer, _
   ByVal toRow As System.Integer, _
   ByVal toColumn As System.Integer, _
   ByVal rowCount As System.Integer, _
   ByVal columnCount As System.Integer, _
   ByVal option As CopyToOption _
) 
'Usage
 
Dim instance As Worksheet
Dim fromRow As System.Integer
Dim fromColumn As System.Integer
Dim toRow As System.Integer
Dim toColumn As System.Integer
Dim rowCount As System.Integer
Dim columnCount As System.Integer
Dim option As CopyToOption
 
instance.MoveTo(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount, option)
public void MoveTo( 
   System.int fromRow,
   System.int fromColumn,
   System.int toRow,
   System.int toColumn,
   System.int rowCount,
   System.int columnCount,
   CopyToOption option
)

Parameters

fromRow
The source row.
fromColumn
The source column.
toRow
The target row.
toColumn
The target column.
rowCount
The row count.
columnCount
The column count.
option
The move option.
Example
This example uses the MoveTo method.
gcSpreadSheet1.Sheets[0].Cells[0, 0, 2, 2].Text = "test";
gcSpreadSheet1.Sheets[0].Cells[0, 0].Tag = "Tag 1";
gcSpreadSheet1.Sheets[0].MoveTo(0, 0, 5, 5, 2, 2, GrapeCity.Windows.SpreadSheet.Data.CopyToOption.All);
GcSpreadSheet1.Sheets(0).Cells(0, 0, 2, 2).Text = "test"
GcSpreadSheet1.Sheets(0).Cells(0, 0).Tag = "Tag 1"
GcSpreadSheet1.Sheets(0).MoveTo(0, 0, 5, 5, 2, 2, GrapeCity.Windows.SpreadSheet.Data.CopyToOption.All)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

Worksheet Class
Worksheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.