Link Search Menu Expand Document

SSpread.SwapRowRange Method

Explanation Swaps the specified row range with another row range.

Swaps the data and format of the row range. The number of rows to be replaced is the same as the range of rows to be replaced.

Use the SwapRange method to swap cell ranges and the SwapColRange method to swap column ranges.
The row range can be copied or moved using the CopyRowRange and MoveColRange methods.
Call format SwapRowRange(row, row2, rowdest)
Return value None
Arguments row Row number at the beginning of the row range of the swap source
row2 The last row number in the row range to be swapped
rowdest Row number at the beginning of the row range of the swap destination
Exception EXT-28 An error occurred in the SwapRowRange method
Example of use
    BlockMode = $TRUE;
    Col = 2;
    Row = 2;
    Col2 = 4;
    Row2 = 4;
    Text = "sample";
    BackColor = $GREEN;
    Row = 6;
    Row2 = 8;
    Text = "sample2";
    BackColor = $RED;
    BlockMode = $FALSE;
    
    SwapRowRange(2, 3, 6);
    
Related item CopyColRange, CopyRowRange, MoveColRange, MoveRowRange, SwapColRange, SwapRange methods