Copy

Copy([destination])

Copies the range to the specified range or to the clipboard.

Parameters:

Name Type Default Description
destination ApiRange null

Specifies the new range to which the specified range will be copied. If this argument is omitted, the range will be copied to the clipboard.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue("This is a sample text which is copied to the range A3.");
oRange.Copy(oWorksheet.GetRange("A3"));
builder.SaveFile("xlsx", "Copy.xlsx");
builder.CloseFile();

Resulting document