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

Glossary Item Box

CopyColRange Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Copies the specified range of columns to the specified destination.

Syntax

C++

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

Visual Basic

fpSpread1.CopyColRange(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 copy
lCol2 Column number of last column in range to copy
lColDest Destination column at which to paste the range of columns

Remarks

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

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

Copying a range of columns copies the columns and pastes them at the designated location. The pasted columns delete the contents of existing columns. For example, pasting columns B and C to column F pastes column B's and column C's contents into columns F and G, deleting the contents of columns F and G.

Caution: Copying a range of columns pastes them over existing columns. 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 columns using the MoveColRange and SwapColRange methods.

Return Type

None

See Also

Copying Data Using Code

Sheet property

CopyRange, CopyRowRange, MoveColRange, MoveRowRange, SwapColRange, SwapRowRange methods

DLL Correspondence

SSCopyRange function

Copyright © GrapeCity, inc. All rights reserved.