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

Glossary Item Box

MoveRowRange Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Moves the specified range of rows to the specified destination.

Syntax

C++

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

Visual Basic

fpSpread1.MoveRowRange(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 move
lRow2 Row number of last row in range to move
lRowDest Destination row at which to paste the range of rows

Remarks

Use the MoveRowRange method as a fast way to move the data and formatting in a range of rows in the sheet. To move a range of cells, use the MoveRange method. To move a range of columns, use the MoveColRange method.

Moving a range of rows using the MoveRowRange method moves the data and formatting, including formulas and cell notes.

Moving a range of rows cuts 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 rows 2's and row 3's contents into rows 6 and 7, deleting the contents of rows 6 and 7.

Caution: Moving a range of rows pastes them over existing rows. You might want to caution users and have them verify a move 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 copy and swap ranges of rows using the CopyRowRange and SwapRowRange methods.

Return Type

None

See Also

Moving Data Using Code

Sheet property

CopyColRange, CopyRowRange, MoveColRange, MoveRange, SwapColRange, SwapRowRange methods

DLL Correspondence

SSMoveRange function

Copyright © GrapeCity, inc. All rights reserved.