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

Glossary Item Box

SwapColRange Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Swaps the specified range of columns with another range of columns.

Syntax

C++

void CSpreadSheet::SwapColRange(long lCol, long lCol2, long lColDest);

Visual Basic

fpSpread1.SwapColRange(ByVal lCol As Long, ByVal lCol2 As Long, ByVal lColDest As Long)

Parameters

The following parameters are available:

Parameter Description
lCol Column number of first column in range to swap
lCol2 Column number of last column in range to swap
lColDest First column of range of columns to swap with columns specified by lCol and lCol2 parameters

Remarks

Use the SwapColRange method as a fast way to swap the data and formatting in a range of columns in the sheet. To swap a range of cells, use the SwapRange method. To swap a range of rows, use the SwapRowRange method.

Swapping a range of columns using the SwapColRange method swaps the data and formatting, including formulas and cell notes.

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 move ranges of columns using the CopyColRange and MoveColRange methods.

Return Type

None

See Also

Swapping Data

Sheet property

CopyColRange, CopyRowRange, MoveColRange, MoveRowRange, SwapRange, SwapRowRange methods

DLL Correspondence

SSSwapRange function

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