Spread 8.0 Documentation
CopyRowRange Method
Support Options
ActiveX Reference > ActiveX Methods > CopyRowRange Method

Glossary Item Box

CopyRowRange Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Copies the specified range of rows to the specified destination.

Syntax

C++

void CSpreadSheet::CopyRowRange(long lRow, long lRow2,long lRowDest);

Visual Basic

fpSpread1.CopyRowRange(ByVal lRow As Long, ByVal lRow2 As Long, ByVal lRowDest As Long)

Parameters

The following parameters are available:

Parameter Description
lRow Row number of first row in range to copy
lRow2 Row number of last row in range to copy
lRowDest Destination row at which to paste the range of rows

Remarks

Use the CopyRowRange method as a fast way to copy the data and formatting in a range of rows in the sheet. To copy a range of cells, use the CopyRange method. To copy a range of columns, use the CopyColRange method.

Copying a range of rows using the CopyRowRange method copies the data and formatting, including formulas and cell notes.

Copying a range of rows copies the rows and pastes them at the designated location. The pasted rows delete the contents of existing rows. For example, pasting rows 2 and 3 to row 6 pastes row 2's and row 3's contents into rows 6 and 7, deleting the contents of rows 6 and 7.

Caution: Copying a range of rows pastes them over existing rows. You might want to caution users and have them verify a copy command before overwriting their existing data.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

You can move and swap ranges of rows using the MoveRowRange and SwapRowRange methods.

Return Type

None

See Also

Copying Data Using Code

CopyColRange, CopyRange, MoveColRange, MoveRowRange, Sheet, SwapColRange, SwapRowRange methods

DLL Correspondence

SSCopyRange function

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