Spread 8.0 Documentation
SSMoveRange Function
Support Options
DLL Reference > DLL Functions > SSMoveRange Function

Glossary Item Box

SSMoveRange Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Moves the specified block of cells to another location in the sheet.

Syntax

C

BOOL SSMoveRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, SS_COORD ColDest, SS_COORD RowDest);

C++

BOOL TSpread::MoveRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, SS_COORD ColDest, SS_COORD RowDest);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of upper-left cell in block
Row Row number of upper-left cell in block
Col2 Column number of lower-right cell in block
Row2 Row number of lower-right cell in block
ColDest Column number of upper-left destination cell
RowDest Row number of upper-left destination cell

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

Remarks

Use this function to move a block of cells. If data exists in the destination range, the existing data is replaced by the data in the block of cells you moved.

The SSMoveRange function moves both the data and the formatting information in the range of cells.

Cell-related information (for example, text, font, background color, text color, and cell type) is stored in one of four locations:

When applied to a block of cells, the SSMoveRange function works with only the information in the cell itself. If you set the Col or Row parameter to –1 to write data, no information is stored in the cell itself and the SSMoveRange function is ignored. For more information, see Using Column and Row Properties.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Moving Data Using Code

SSCopyRange, SSSetSheet, SSSwapRange functions

ActiveX Correspondence

MoveRange method

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.