Spread Windows Forms 15.0
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / SheetView Class / SwapRange Method
Row index of the top-left cell in the block from which to swap
Column index of the top-left cell in the block from which to swap
Row index of the top-left cell in the destination block
Column index of the top-left cell in the destination block
Number of rows in the block of cells
Number of columns in the block of cells
Whether only the data is copied, or the data and formatting


In This Topic
    SwapRange Method
    In This Topic
    Swaps the data and formatting in a block of cells on this sheet with another block of cells on this sheet.
    Syntax
    'Declaration
     
    
    Public Sub SwapRange( _
       ByVal fromRow As Integer, _
       ByVal fromColumn As Integer, _
       ByVal toRow As Integer, _
       ByVal toColumn As Integer, _
       ByVal rowCount As Integer, _
       ByVal columnCount As Integer, _
       ByVal dataOnly As Boolean _
    ) 
    'Usage
     
    
    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.SwapRange(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount, dataOnly)

    Parameters

    fromRow
    Row index of the top-left cell in the block from which to swap
    fromColumn
    Column index of the top-left cell in the block from which to swap
    toRow
    Row index of the top-left cell in the destination block
    toColumn
    Column index of the top-left cell in the destination block
    rowCount
    Number of rows in the block of cells
    columnCount
    Number of columns in the block of cells
    dataOnly
    Whether only the data is copied, or the data and formatting
    Exceptions
    ExceptionDescription
    Operation is not valid; cannot swap entire sheet of cells
    Operation is not valid; cannot swap entire columns over partial columns
    Operation is not valid; cannot swap entire rows over partial rows
    Operation is not valid; cannot swap a range of cells over part of a spanned cell
    See Also