Click or drag to resize
CellRangeCopyTo Method (ExcelWorksheet, String)
Copies this cell range to another worksheet.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1033
Syntax
public void CopyTo(
	ExcelWorksheet destinationWorksheet,
	string topLeftCell
)

Parameters

destinationWorksheet
Type: GemBox.SpreadsheetExcelWorksheet
Destination worksheet.
topLeftCell
Type: SystemString
Full name of the top-left cell of the destination range.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionDestination range is invalid.
Remarks

topLeftCell specifies position of the top-left cell of the destination cell range.

Destination cell range has the same width and height as this cell range.

ArgumentOutOfRangeException is thrown if destination range:

  • breaks Excel worksheet row or column limit,
  • overlaps with source range, or
  • overlaps with existing merged range.

See Also