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

Glossary Item Box

SSCopyRange Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Copies a block of cells to a new location.

Syntax

C

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

C++

BOOL TSpread::CopyRange(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 or column number of upper-left cell in block to copy
Row Row number or row number of upper-left cell in block to copy
Col2 Column number of lower-right cell in block to copy
Row2 Row number of lower-right cell in block to copy
ColDest Destination column for upper-left cell in block
RowDest Destination row for upper-left cell in 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 SSCopyRange function copies both the data and the formatting information in the range of cells.

The destination column and row indicate the upper-left cell of the destination block. The contents of the destination block cells are replaced by the copied cells' contents. Destination cells that overlap the original block of cells are handled as described in Copying Data.

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 SSCopyRange function works with only the information in the cell itself. If you set the Col or Row parameter to SS_ALLCOLS or SS_ALLROWS to write data, no information is stored in the cell itself and the SSCopyRange function is ignored. For more information, see Using Column and Row Properties.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Copying Data Using Code

SSMoveRange, SSSetSheet, SSSwapRange functions

ActiveX Correspondence

CopyRange method

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