Moves the data, formatting, formulas, and notes from a block of cells on this sheet to a new location.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As SheetView
Dim fromRow As Integer
Dim fromColumn As Integer
Dim toRow As Integer
Dim toColumn As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim dataOnly As Boolean
instance.MoveRange(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount, dataOnly) |
Parameters
- fromRow
- Row index of top-left cell in block to move
- fromColumn
- Column index of top-left cell in block to move
- toRow
- Row index for destination of upper-left cell in block
- toColumn
- Column index for destination of upper-left cell in block
- rowCount
- Number of rows in the block
- columnCount
- Number of columns in the block
- dataOnly
- Whether data only or data with formatting are swapped
Exceptions
Remarks
Example
This example moves a range of data from one location in the active sheet to another.
C# | Copy Code |
---|
fpSpread1.ActiveSheet.Cells[0, 0, 2, 2].Text = "Test Move";
fpSpread1.ActiveSheet.MoveRange(0, 0, 4, 0, 2, 2, true); |
Visual Basic | Copy Code |
---|
FpSpread1.ActiveSheet.Cells(0, 0, 2, 2).Text = "Test Move"
FpSpread1.ActiveSheet.MoveRange(0, 0, 4, 0, 2, 2, True) |
Requirements
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
See Also