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

Glossary Item Box

SSSwapRange Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Swaps a block of cells with another block of cells.

Syntax

C

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

C++

BOOL TSpread::SwapRange(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 of the block
(Value can be SS_ALLCOLS to swap only rows.)
Row Row number of upper-left cell of the block
(Value can be SS_ALLROWS to swap only columns.)
Col2 Column number of lower-right cell of the block
(If Col is SS_ALLCOLS, this value is ignored.)
Row2 Row number of lower-right cell of the block
(If Row is SS_ALLROWS, this value is ignored.)
ColDest Column number of upper-left cell of the destination block
RowDest Row number of upper-left cell of the destination block

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

The SSSwapRange function swaps 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 SSSwapRange 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 SSSwapRange function is ignored. For more information, see Using Column and Row Properties.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Swapping Data

SSCopyRange, SSMoveRange, SSSetSheet functions

ActiveX Correspondence

SwapRange method

Copyright © GrapeCity, inc. All rights reserved.