Spread Windows Forms 6.0 Product Documentation
CopyRange(Int32,Int32,Int32,Int32,Int32,Int32,Boolean) Method
See Also  Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : CopyRange(Int32,Int32,Int32,Int32,Int32,Int32,Boolean) Method


fromRow
Row index of top-left cell in block to copy
fromColumn
Column index of top-left cell in block to copy
toRow
Row index of top-left cell in destination
toColumn
Column index of top-left cell in destination
rowCount
Number of rows in the block
columnCount
Number of columns in the block
dataOnly
Whether only the data is copied, or the data and formatting

Glossary Item Box

Copies the data, formatting, formulas, and notes from a block of cells on the sheet to a new location.

Syntax

Visual Basic (Declaration) 
Public Sub CopyRange( _
   ByVal fromRow As Integer, _
   ByVal fromColumn As Integer, _
   ByVal toRow As Integer, _
   ByVal toColumn As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer, _
   ByVal dataOnly As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim fromRow As Integer
Dim fromColumn As Integer
Dim toRow As Integer
Dim toColumn As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim dataOnly As Boolean
 
instance.CopyRange(fromRow, fromColumn, toRow, toColumn, rowCount, columnCount, dataOnly)
C# 
public void CopyRange( 
   int fromRow,
   int fromColumn,
   int toRow,
   int toColumn,
   int rowCount,
   int columnCount,
   bool dataOnly
)

Parameters

fromRow
Row index of top-left cell in block to copy
fromColumn
Column index of top-left cell in block to copy
toRow
Row index of top-left cell in destination
toColumn
Column index of top-left cell in destination
rowCount
Number of rows in the block
columnCount
Number of columns in the block
dataOnly
Whether only the data is copied, or the data and formatting

Exceptions

ExceptionDescription
System.InvalidOperationException Operation is not valid; cannot copy entire sheet of cells
System.InvalidOperationException Operation is not valid; cannot copy entire columns over partial columns
System.InvalidOperationException Operation is not valid; cannot copy entire rows over partial rows
System.InvalidOperationException Operation is not valid; cannot copy a range of cells over part of a spanned cell

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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