Link Search Menu Expand Document

SSpread.CopyRange Method

Explanation Copies the specified cell block to the specified location.

The data and formats in the cell block are copied. The copy destination cell will be overwritten with the same range as the copy source cell block.

Use the CopyColRange method to copy a column range and the CopyRowRange method to copy a row range. The MoveRange and SwapRange methods can be used to move or swap cell blocks.
Call format CopyRange(col, row, col2, row2, coldest, rowdest)
Return value None
Arguments col Column number of the upper left cell of the copy source block
row Row number in the upper left cell of the copy source block
col2 Column number of the lower right cell of the copy source block
row2 Row number of the lower right cell of the copy source block
coldest Column number of the upper left cell of the copy destination block
rowdest Row number in the upper left cell of the copy destination block
Exception EXT-28 An error occurred in the CopyRange method
Example of use
    BlockMode = $TRUE;
    Col = 2;
    Row = 2;
    Col2 = 4;
    Row2 = 4;
    Text = "sample";
    BackColor = $GREEN;
    BlockMode = $FALSE;
    
    CopyRange(2, 2, 3, 3, 6, 6);
    
Related item ClearRange, CopyColRange, CopyRowRange, MoveRange, SwapRange methods