TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

Paste

Paste(rangeFrom)

Pastes the Range object to the specified range.

Parameters:

Name Type Description
rangeFrom ApiRange

Specifies the range to be pasted to the current range

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("B4").SetValue("1");
oWorksheet.GetRange("C4").SetValue("2");
oWorksheet.GetRange("D4").SetValue("3");
var oRangeFrom = oWorksheet.GetRange("B4:D4");
var oRange = oWorksheet.GetRange("A1:C1");
oRange.Paste(oRangeFrom);
builder.SaveFile("xlsx", "Paste.xlsx");
builder.CloseFile();

Resulting document